This commit is contained in:
Geoffrey Goh
2016-02-12 11:14:02 -08:00
parent 7bb4e1099e
commit 434baeb55f

View File

@@ -211,9 +211,7 @@ NSString * const UnzippedFolderName = @"unzipped";
withIntermediateDirectories:YES
attributes:nil
error:&error];
}
if ([[NSFileManager defaultManager] fileExistsAtPath:newPackageFolderPath]) {
} else if ([[NSFileManager defaultManager] fileExistsAtPath:newPackageFolderPath]) {
// This removes any stale data in newPackageFolderPath that could have been left
// uncleared due to a crash or error during the download or install process.
[[NSFileManager defaultManager] removeItemAtPath:newPackageFolderPath