Revision: 2798
http://skim-app.svn.sourceforge.net/skim-app/?rev=2798&view=rev
Author: hofman
Date: 2007-09-01 09:01:56 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
Set correct file attributes of files in PDF bundles when saving.
Modified Paths:
--------------
trunk/SKDocument.m
Modified: trunk/SKDocument.m
===================================================================
--- trunk/SKDocument.m 2007-09-01 15:30:08 UTC (rev 2797)
+++ trunk/SKDocument.m 2007-09-01 16:01:56 UTC (rev 2798)
@@ -289,10 +289,14 @@
fileEnum = [[fm directoryContentsAtPath:tmpPath]
objectEnumerator];
while (success && (file = [fileEnum nextObject])) {
NSString *filePath = [path
stringByAppendingPathComponent:file];
- if ([fm movePath:[tmpPath
stringByAppendingPathComponent:file] toPath:filePath handler:nil])
- [fm changeFileAttributes:[self
fileAttributesToWriteToURL:[NSURL fileURLWithPath:filePath] ofType:typeName
forSaveOperation:saveOperation originalContentsURL:[self fileURL] error:NULL]
atPath:filePath];
- else if ([ourImportantExtensions containsObject:[[file
pathExtension] lowercaseString]])
+ if ([fm movePath:[tmpPath
stringByAppendingPathComponent:file] toPath:filePath handler:nil]) {
+ NSURL *fileURL = [NSURL fileURLWithPath:filePath];
+ NSString *fileType = [[NSDocumentController
sharedDocumentController] typeForContentsOfURL:fileURL error:NULL];
+ NSDictionary *fileAttributes = [self
fileAttributesToWriteToURL:fileURL ofType:fileType
forSaveOperation:saveOperation originalContentsURL:[self fileURL] error:NULL];
+ [fm changeFileAttributes:fileAttributes
atPath:filePath];
+ } else if ([ourImportantExtensions containsObject:[[file
pathExtension] lowercaseString]]) {
success = NO;
+ }
}
if (success)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit