diff options
author | Hai Zhang <zhanghai@google.com> | 2020-05-14 16:37:09 -0700 |
---|---|---|
committer | Hai Zhang <zhanghai@google.com> | 2020-05-18 17:21:13 -0700 |
commit | 4035e6e1252d7c4518c793da607bdf289f3395d3 (patch) | |
tree | 9fb0225b686b43f5865b5a8e950c6e49a2a1f3f3 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 4bc57bff41dc6d38a133c17449e793136844d334 (diff) |
Change AtomicFile to use rename-into-place.
The previous implementation of backing up beforehand doesn't handle
the case where the file is created for the first time, and might leave
a corrupted file in case of failure.
This new implementation creates a new file for writing data into, and
renames it into the place of the original file after writing
finished.
Fixes: 151959443
Test: atest android.util.AtomicFileTest
Change-Id: I5c4c438526a2aecdd2af18f71e16b41a05817c61
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions