summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2022-11-09 21:36:03 +0100
committerJoel Rosdahl <joel@rosdahl.net>2023-01-11 19:42:29 +0100
commit0655cd459bb35d002f4b8e7c670cb699f8021f98 (patch)
treec83d765d01d45744a4b0b0fef0be386dbb4077d4 /src
parent3722a1e0001cd52d2b2b8f1b9a40917783d499f9 (diff)
downloadccache-0655cd459bb35d002f4b8e7c670cb699f8021f98.tar.gz
chore: Remove special logic for cleaning up legacy ccache files
Diffstat (limited to 'src')
-rw-r--r--src/storage/local/LocalStorage_cleanup.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/storage/local/LocalStorage_cleanup.cpp b/src/storage/local/LocalStorage_cleanup.cpp
index 1293af4a..d3e8754e 100644
--- a/src/storage/local/LocalStorage_cleanup.cpp
+++ b/src/storage/local/LocalStorage_cleanup.cpp
@@ -191,24 +191,6 @@ LocalStorage::clean_dir(const std::string& subdir,
}
}
- if (util::ends_with(file.path(), ".stderr")) {
- // In order to be nice to legacy ccache versions, make sure that the .o
- // file is deleted before .stderr, because if the ccache process gets
- // killed after deleting the .stderr but before deleting the .o, the
- // cached result will be inconsistent. (.stderr is the only file that is
- // optional for legacy ccache versions; any other file missing from the
- // cache will be detected.)
- std::string o_file = file.path().substr(0, file.path().size() - 6) + "o";
-
- // Don't subtract this extra deletion from the cache size; that
- // bookkeeping will be done when the loop reaches the .o file. If the
- // loop doesn't reach the .o file since the target limits have been
- // reached, the bookkeeping won't happen, but that small counter
- // discrepancy won't do much harm and it will correct itself in the next
- // cleanup.
- delete_file(o_file, 0, nullptr, nullptr);
- }
-
delete_file(file.path(), file.size_on_disk(), &cache_size, &files_in_cache);
cleaned = true;
}