Merge pull request #3482 from pmiddend/ignore-hidden-files-in-temproots
gc.cc: Ignore hidden files in temproots
This commit is contained in:
commit
f46cb682f1
|
@ -202,6 +202,11 @@ void LocalStore::findTempRoots(FDs & fds, Roots & tempRoots, bool censor)
|
||||||
/* Read the `temproots' directory for per-process temporary root
|
/* Read the `temproots' directory for per-process temporary root
|
||||||
files. */
|
files. */
|
||||||
for (auto & i : readDirectory(tempRootsDir)) {
|
for (auto & i : readDirectory(tempRootsDir)) {
|
||||||
|
if (i.name[0] == '.') {
|
||||||
|
// Ignore hidden files. Some package managers (notably portage) create
|
||||||
|
// those to keep the directory alive.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Path path = tempRootsDir + "/" + i.name;
|
Path path = tempRootsDir + "/" + i.name;
|
||||||
|
|
||||||
pid_t pid = std::stoi(i.name);
|
pid_t pid = std::stoi(i.name);
|
||||||
|
|
Loading…
Reference in a new issue