Permalink
Browse files

Fixes #113: Need to check isReadableFileAtPath: when copying out DMG…

… contents
  • Loading branch information...
andymatuschak committed Nov 2, 2011
1 parent d092ae9 commit 55eed9efd84c4a2163a3e2b86c8d9b68a243fb6b
Showing with 4 additions and 0 deletions.
  1. +4 −0 SUDiskImageUnarchiver.m
View
@@ -83,6 +83,10 @@ - (void)extractDMG
NSString *fromPath = [mountPoint stringByAppendingPathComponent:item];
NSString *toPath = [[archivePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:item];
+ // We skip any files in the DMG which are not readable.
+ if (![manager isReadableFileAtPath:fromPath])
+ continue;
+
SULog(@"copyItemAtPath:%@ toPath:%@", fromPath, toPath);
if (![manager copyItemAtPath:fromPath toPath:toPath error:&error])

0 comments on commit 55eed9e

Please sign in to comment.