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

This commit is contained in:
Andy Matuschak committed 2011-11-02 10:27:32 -07:00
1 parent d092ae9295
commit 55eed9efd8
1 file changed
+4
+4
View File
@@ -83,6 +83,10 @@
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])