Skip to content

Commit

Permalink
Merge pull request NixOS#3482 from pmiddend/ignore-hidden-files-in-te…
Browse files Browse the repository at this point in the history
…mproots

gc.cc: Ignore hidden files in temproots
  • Loading branch information
edolstra authored Apr 9, 2020
2 parents 30d4618 + 04bedda commit f46cb68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libstore/gc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ void LocalStore::findTempRoots(FDs & fds, Roots & tempRoots, bool censor)
/* Read the `temproots' directory for per-process temporary root
files. */
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;

pid_t pid = std::stoi(i.name);
Expand Down

0 comments on commit f46cb68

Please sign in to comment.