Revision: 15604
          http://sourceforge.net/p/skim-app/code/15604
Author:   hofman
Date:     2025-07-04 15:24:39 +0000 (Fri, 04 Jul 2025)
Log Message:
-----------
Log errors when writing notes to extended attributes

Modified Paths:
--------------
    trunk/SKMainDocument.m

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2025-07-04 14:49:11 UTC (rev 15603)
+++ trunk/SKMainDocument.m      2025-07-04 15:24:39 UTC (rev 15604)
@@ -519,6 +519,7 @@
     
     SKNSkimNotesWritingOptions writeOptions = 0;
     SKNXattrFlags flags = kSKNXattrDefault;
+    NSError *error = nil;
     if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKWriteLegacySkimNotesKey] == NO) {
         writeOptions = SKNSkimNotesWritingSyncable;
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKWriteSkimNotesAsArchiveKey] == NO)
@@ -526,8 +527,11 @@
         flags = kSKNXattrSyncable;
     }
     
-    BOOL success = [fm writeSkimNotes:[self SkimNoteProperties] 
textNotes:[self notesString] richTextNotes:[self notesRTFData] 
toExtendedAttributesAtURL:absoluteURL options:writeOptions error:NULL];
+    BOOL success = [fm writeSkimNotes:[self SkimNoteProperties] 
textNotes:[self notesString] richTextNotes:[self notesRTFData] 
toExtendedAttributesAtURL:absoluteURL options:writeOptions error:&error];
     
+    if (success == NO)
+        NSLog(@"Error attaching notes: %@", error);
+    
     NSDictionary *options = [self presentationOptions];
     SKNExtendedAttributeManager *eam = [SKNExtendedAttributeManager 
sharedNoSplitManager];
     [eam removeExtendedAttributeNamed:PRESENTATION_OPTIONS_KEY 
atPath:[absoluteURL path] traverseLink:YES error:NULL];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to