Merge "Don't delete the new file in openRead()." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-20 07:39:29 +00:00
committed by Android (Google) Code Review

View File

@@ -227,11 +227,8 @@ public class AtomicFile {
} }
} }
if (mNewName.exists()) { // Don't delete mNewName here - it was okay to call openRead() between startWrite() and
if (!mNewName.delete()) { // finishWrite(), and we have to keep supporting it.
Log.e(LOG_TAG, "Failed to delete outdated new file " + mNewName);
}
}
return new FileInputStream(mBaseName); return new FileInputStream(mBaseName);
} }