diff options
author | Brian Carlstrom <bdc@google.com> | 2014-09-24 07:17:45 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-24 07:17:45 +0000 |
commit | b45c3369cc005d2d436ec4cf9ffcd5e9e2130554 (patch) | |
tree | 33c14cf4133ce5efa716721289a922dfa00f4803 | |
parent | f038ed9f031acb9c4fdf8a7f86e3c7ffad537e37 (diff) | |
parent | 4f694baebb578b3ecc0c431f2a05c92efb9a50b3 (diff) | |
download | art-b45c3369cc005d2d436ec4cf9ffcd5e9e2130554.zip art-b45c3369cc005d2d436ec4cf9ffcd5e9e2130554.tar.gz art-b45c3369cc005d2d436ec4cf9ffcd5e9e2130554.tar.bz2 |
Merge "dex2oat should truncate files opened from file descriptors"
-rw-r--r-- | dex2oat/dex2oat.cc | 1 |
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; |