1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 00:51:47 +02:00

pathInfoCache: Use the entire base name as the cache key

This fixes a bug in the garbage collector where if a path
/nix/store/abcd-foo is valid, but we do a
isValidPath("/nix/store/abcd-foo.lock") first, then a negative entry
for /nix/store/abcd is added to pathInfoCache, so /nix/store/abcd-foo
is subsequently considered invalid and deleted.
This commit is contained in:
Eelco Dolstra 2021-10-14 13:28:22 +02:00
parent eab934cb2a
commit 0be8cc1466
5 changed files with 27 additions and 23 deletions

View file

@ -232,7 +232,6 @@ protected:
struct State
{
// FIXME: fix key
LRUCache<std::string, PathInfoCacheValue> pathInfoCache;
};