Merge "add fsync when copy native libs" am: 32ad6e6d7f am: d49c7332a8 am: f5351ea3a2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2252338 Change-Id: I007daa216e17c08b07f868db5b47b28610b3bbaa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -257,6 +257,13 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr
|
||||
return INSTALL_FAILED_CONTAINER_ERROR;
|
||||
}
|
||||
|
||||
if (fsync(fd) < 0) {
|
||||
ALOGE("Coulnd't fsync temporary file name: %s: %s\n", localTmpFileName, strerror(errno));
|
||||
close(fd);
|
||||
unlink(localTmpFileName);
|
||||
return INSTALL_FAILED_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
// Set the modification time for this file to the ZIP's mod time.
|
||||
|
||||
Reference in New Issue
Block a user