Revision: 6576
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6576&view=rev
Author:   hofman
Date:     2010-06-08 11:43:22 +0000 (Tue, 08 Jun 2010)

Log Message:
-----------
write file attributes to autosaved skim file

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

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2010-06-08 09:42:55 UTC (rev 6575)
+++ trunk/SKMainDocument.m      2010-06-08 11:43:22 UTC (rev 6576)
@@ -357,10 +357,12 @@
                 if (fileExists)
                     saveNotesOK = [fm removeItemAtPath:notesPath error:NULL];
                 if ([[self notes] count]) {
-                    if (saveNotesOK)
-                        saveNotesOK = [fm moveItemAtPath:tmpPath 
toPath:notesPath error:NULL];
-                    else
+                    if (saveNotesOK == NO) {
                         [fm removeItemAtPath:tmpPath error:NULL];
+                    } else if (saveNotesOK = [fm moveItemAtPath:tmpPath 
toPath:notesPath error:NULL]) {
+                        NSDictionary *attrs = [self 
fileAttributesToWriteToURL:[NSURL fileURLWithPath:notesPath] 
ofType:SKNotesDocumentType forSaveOperation:NSSaveToOperation 
originalContentsURL:nil error:NULL];
+                        [fm setAttributes:attrs ofItemAtPath:notesPath 
error:NULL];
+                    }
                 }
             }
         }


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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to