diff options
author | Dees Troy <dees_troy@teamw.in> | 2015-11-05 19:45:31 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit> | 2015-11-05 19:45:31 +0100 |
commit | 6299d2edc484bec44d91a076094332fbe7218f40 (patch) | |
tree | de655c7352e642085c224902e104aa5b6fc0015e | |
parent | Fix screen timeout text placement (diff) | |
parent | Revert :Force sync files written by minzip (diff) | |
download | android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.tar android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.tar.gz android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.tar.bz2 android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.tar.lz android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.tar.xz android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.tar.zst android_bootable_recovery-6299d2edc484bec44d91a076094332fbe7218f40.zip |
Diffstat (limited to '')
-rw-r--r-- | minzip/Zip.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c index c6272509f..1f035add5 100644 --- a/minzip/Zip.c +++ b/minzip/Zip.c @@ -977,8 +977,7 @@ bool mzExtractRecursive(const ZipArchive *pArchive, setfscreatecon(secontext); } - int fd = open(targetFile, O_CREAT|O_WRONLY|O_TRUNC|O_SYNC, - UNZIP_FILEMODE); + int fd = creat(targetFile, UNZIP_FILEMODE); if (secontext) { freecon(secontext); @@ -993,12 +992,7 @@ bool mzExtractRecursive(const ZipArchive *pArchive, } bool ok = mzExtractZipEntryToFile(pArchive, pEntry, fd); - if (ok) { - ok = (fsync(fd) == 0); - } - if (close(fd) != 0) { - ok = false; - } + close(fd); if (!ok) { LOGE("Error extracting \"%s\"\n", targetFile); ok = false; |