mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Use std::filesystem::path
in more executables
This commit is contained in:
parent
8e70f6f850
commit
d98e06a581
2 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ bool dryRun = false;
|
|||
* Of course, this makes rollbacks to before this point in time
|
||||
* impossible. */
|
||||
|
||||
void removeOldGenerations(std::string dir)
|
||||
void removeOldGenerations(std::filesystem::path dir)
|
||||
{
|
||||
if (access(dir.c_str(), R_OK) != 0) return;
|
||||
|
||||
|
@ -81,7 +81,7 @@ static int main_nix_collect_garbage(int argc, char * * argv)
|
|||
});
|
||||
|
||||
if (removeOld) {
|
||||
std::set<Path> dirsToClean = {
|
||||
std::set<std::filesystem::path> dirsToClean = {
|
||||
profilesDir(), settings.nixStateDir + "/profiles", dirOf(getDefaultProfile())};
|
||||
for (auto & dir : dirsToClean)
|
||||
removeOldGenerations(dir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue