mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
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
1 changed files with 5 additions and 0 deletions
|
@ -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