Previously, a store item that is a regular file would not be accounted for in the 'bytesFreed' value computed by 'deletePath' because its 'st_nlink' count would always be >= 2. This commit fixes that. * nix/libutil/util.hh (deletePath): Add optional 'linkThreshold' argument. * nix/libutil/util.cc (_deletePath): Add 'linkThreshold' argument and honor it. Pass it down in recursive call. (deletePath): Add 'linkThreshold' and honor it. * nix/libstore/gc.cc (LocalStore::deleteGarbage): Pass 'linkThreshold' argument to 'deletePath', with a value of 2 when PATH is a store item and deduplication is on. |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| build.cc | ||
| builtins.cc | ||
| builtins.hh | ||
| derivations.cc | ||
| derivations.hh | ||
| gc.cc | ||
| globals.cc | ||
| globals.hh | ||
| local-store.cc | ||
| local-store.hh | ||
| misc.cc | ||
| misc.hh | ||
| optimise-store.cc | ||
| pathlocks.cc | ||
| pathlocks.hh | ||
| references.cc | ||
| references.hh | ||
| sqlite.cc | ||
| sqlite.hh | ||
| store-api.cc | ||
| store-api.hh | ||
| worker-protocol.hh | ||