Permalink
Browse files

Merge pull request #183 from sinbad/fix-10.6-arg-list-too-long

Use NSFileManager interface for DMG unarchive only for 10.7+.
  • Loading branch information...
andymatuschak committed Jul 6, 2012
2 parents 05c51a1 + 91ac917 commit 118f3c51414c2ad0a9739d0105cab14b24993448
Showing with 3 additions and 3 deletions.
  1. +3 −3 SUDiskImageUnarchiver.m
View
@@ -108,8 +108,8 @@ - (void)extractDMGWithPassword:(NSString *)password
mountedSuccessfully = YES;
// Now that we've mounted it, we need to copy out its contents.
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) {
- // On 10.6 and later we don't want to use the File Manager API and instead want to use NSFileManager (fixes #827357).
+ if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) {
+ // On 10.7 and later we don't want to use the File Manager API and instead want to use NSFileManager (fixes #827357).
NSFileManager *manager = [[[NSFileManager alloc] init] autorelease];
NSError *error = nil;
NSArray *contents = [manager contentsOfDirectoryAtPath:mountPoint error:&error];
@@ -134,7 +134,7 @@ - (void)extractDMGWithPassword:(NSString *)password
if (![manager copyItemAtPath:fromPath toPath:toPath error:&error])
{
- SULog(@"Couldn't copy item: %@", error);
+ SULog(@"Couldn't copy item: %@ : %@", error, error.userInfo ? error.userInfo : @"");
goto reportError;
}
}

0 comments on commit 118f3c5

Please sign in to comment.