diff options
Diffstat (limited to 'artd/file_utils.cc')
-rw-r--r-- | artd/file_utils.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/artd/file_utils.cc b/artd/file_utils.cc index 53fe9f9625..0ce782a7e9 100644 --- a/artd/file_utils.cc +++ b/artd/file_utils.cc @@ -81,6 +81,9 @@ Result<void> NewFile::CommitOrAbandon() { std::error_code ec; std::filesystem::rename(temp_path_, final_path_, ec); if (ec) { + // If this fails because the temp file doesn't exist, it could be that the file is deleted by + // `Artd::cleanup` if that method is run simultaneously. At the time of writing, this should + // never happen because `Artd::cleanup` is only called at the end of the backgrond dexopt job. return Errorf( "Failed to move new file '{}' to path '{}': {}", temp_path_, final_path_, ec.message()); } |