Revision: 7499 http://skim-app.svn.sourceforge.net/skim-app/?rev=7499&view=rev Author: hofman Date: 2011-09-21 15:03:01 +0000 (Wed, 21 Sep 2011) Log Message: ----------- we can run method on background thread using filemanager instance
Modified Paths: -------------- trunk/vendorsrc/andymatuschak/Sparkle/SUPlainInstallerInternals.m Modified: trunk/vendorsrc/andymatuschak/Sparkle/SUPlainInstallerInternals.m =================================================================== --- trunk/vendorsrc/andymatuschak/Sparkle/SUPlainInstallerInternals.m 2011-09-21 11:20:52 UTC (rev 7498) +++ trunk/vendorsrc/andymatuschak/Sparkle/SUPlainInstallerInternals.m 2011-09-21 15:03:01 UTC (rev 7499) @@ -34,7 +34,7 @@ // that the quarantine is implemented in part by setting an extended attribute, // "com.apple.quarantine", on affected files. Removing this attribute is // sufficient to remove files from the quarantine. -+ (void)releaseFromQuarantine:(NSString*)root; ++ (void)releaseFromQuarantine:(NSString*)root usingFileManager:(NSFileManager *)fileManager; @end // Authorization code based on generous contribution from Allan Odgaard. Thanks, Allan! @@ -252,7 +252,7 @@ // new home in case it's moved across filesystems: if that // happens, the move is actually a copy, and it may result // in the application being quarantined. - [self performSelectorOnMainThread:@selector(releaseFromQuarantine:) withObject:dst waitUntilDone:YES]; + [self releaseFromQuarantine:dst usingFileManager:fm]; return YES; } @@ -298,7 +298,7 @@ return removexattr_func(path, name, options); } -+ (void)releaseFromQuarantine:(NSString*)root ++ (void)releaseFromQuarantine:(NSString*)root usingFileManager:(NSFileManager *)fileManager { const char* quarantineAttribute = "com.apple.quarantine"; const int removeXAttrOptions = XATTR_NOFOLLOW; @@ -311,16 +311,16 @@ // root-level symbolic link. NSDictionary* rootAttributes = #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [[NSFileManager defaultManager] fileAttributesAtPath:root traverseLink:NO]; + [fileManager fileAttributesAtPath:root traverseLink:NO]; #else - [[NSFileManager defaultManager] attributesOfItemAtPath:root error:NULL]; + [fileManager attributesOfItemAtPath:root error:NULL]; #endif NSString* rootType = [rootAttributes objectForKey:NSFileType]; if (rootType == NSFileTypeDirectory) { // The NSDirectoryEnumerator will avoid recursing into any contained // symbolic links, so no further type checks are needed. - NSDirectoryEnumerator* directoryEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:root]; + NSDirectoryEnumerator* directoryEnumerator = [fileManager enumeratorAtPath:root]; NSString* file = nil; while ((file = [directoryEnumerator nextObject])) { [self removeXAttr:quarantineAttribute This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit