Add error checking to a removeTree call

This commit is contained in:
Zorg committed 2015-04-15 00:09:32 -04:00
1 parent 443a6064b3
commit e2fca42f6c
1 file changed
+4 -1
+4 -1
View File
@@ -131,7 +131,10 @@ int applyBinaryDelta(NSString *source, NSString *destination, NSString *patchFil
const char *value;
if (!xar_prop_get(file, "delete", &value) || !xar_prop_get(file, "delete-then-extract", &value)) {
removeTree(destinationFilePath);
if (!removeTree(destinationFilePath)) {
fprintf(stderr, "delete or delete-then-extract: failed to remove %s\n", [destination fileSystemRepresentation]);
return 1;
}
if (!xar_prop_get(file, "delete", &value))
continue;
}