From 55eed9efd84c4a2163a3e2b86c8d9b68a243fb6b Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Wed, 2 Nov 2011 10:27:04 -0700 Subject: [PATCH] Fixes #113: Need to check isReadableFileAtPath: when copying out DMG contents --- SUDiskImageUnarchiver.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SUDiskImageUnarchiver.m b/SUDiskImageUnarchiver.m index 6dcf92bc..a905ee6b 100644 --- a/SUDiskImageUnarchiver.m +++ b/SUDiskImageUnarchiver.m @@ -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])