Merge pull request #89 from Microsoft/asset-update-bug

Delete bundle file if it already exists
This commit is contained in:
Geoffrey Goh
2015-12-04 14:55:49 -08:00

View File

@@ -302,6 +302,14 @@ NSString * const UnzippedFolderName = @"unzipped";
return;
}
} else {
if ([[NSFileManager defaultManager] fileExistsAtPath:bundleFilePath]) {
[[NSFileManager defaultManager] removeItemAtPath:bundleFilePath error:&error];
if (error) {
failCallback(error);
return;
}
}
[[NSFileManager defaultManager] moveItemAtPath:downloadFilePath
toPath:bundleFilePath
error:&error];