summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-09-24 07:17:45 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-24 07:17:45 +0000
commitb45c3369cc005d2d436ec4cf9ffcd5e9e2130554 (patch)
tree33c14cf4133ce5efa716721289a922dfa00f4803
parentf038ed9f031acb9c4fdf8a7f86e3c7ffad537e37 (diff)
parent4f694baebb578b3ecc0c431f2a05c92efb9a50b3 (diff)
downloadart-b45c3369cc005d2d436ec4cf9ffcd5e9e2130554.zip
art-b45c3369cc005d2d436ec4cf9ffcd5e9e2130554.tar.gz
art-b45c3369cc005d2d436ec4cf9ffcd5e9e2130554.tar.bz2
Merge "dex2oat should truncate files opened from file descriptors"
-rw-r--r--dex2oat/dex2oat.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index afc01dc..9e6e958 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1252,6 +1252,7 @@ static int dex2oat(int argc, char** argv) {
} else {
oat_file.reset(new File(oat_fd, oat_location));
oat_file->DisableAutoClose();
+ oat_file->SetLength(0);
}
if (oat_file.get() == nullptr) {
PLOG(ERROR) << "Failed to create oat file: " << oat_location;