* Files in the info directory starting with "." are temporary files
and don't indicate path validity.
This commit is contained in:
parent
5d250ad1ea
commit
e13da525a7
|
@ -408,6 +408,9 @@ ValidPathInfo LocalStore::queryPathInfo(const Path & path)
|
|||
|
||||
bool LocalStore::isValidPath(const Path & path)
|
||||
{
|
||||
/* Files in the info directory starting with a `.' are temporary
|
||||
files. */
|
||||
if (baseNameOf(path).at(0) == '.') return false;
|
||||
return pathExists(infoFileFor(path));
|
||||
}
|
||||
|
||||
|
@ -417,7 +420,7 @@ PathSet LocalStore::queryValidPaths()
|
|||
PathSet paths;
|
||||
Strings entries = readDirectory(nixDBPath + "/info");
|
||||
for (Strings::iterator i = entries.begin(); i != entries.end(); ++i)
|
||||
paths.insert(nixStore + "/" + *i);
|
||||
if (i->at(0) != '.') paths.insert(nixStore + "/" + *i);
|
||||
return paths;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue