Merge "add fsync when copy native libs" am: 32ad6e6d7f am: d49c7332a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2252338 Change-Id: I9251269c94505ed1190aa073ab5a1410e3f6aecb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -260,6 +260,13 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr
|
|||||||
return INSTALL_FAILED_CONTAINER_ERROR;
|
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);
|
close(fd);
|
||||||
|
|
||||||
// Set the modification time for this file to the ZIP's mod time.
|
// Set the modification time for this file to the ZIP's mod time.
|
||||||
|
|||||||
Reference in New Issue
Block a user