Merge "Unlink an old file before moving the new file over it" into jb-mr1-dev

This commit is contained in:
Ken Wakasa 2012-10-04 15:33:38 -07:00 committed by Android (Google) Code Review
commit 20f07e335d

View File

@ -200,6 +200,7 @@ public final class BinaryDictionaryFileDumper {
outputStream.flush();
outputStream.close();
final File finalFile = new File(finalFileName);
finalFile.delete();
if (!outputFile.renameTo(finalFile)) {
throw new IOException("Can't move the file to its final name");
}