mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
remove unused variable and make sure to check that the current
generation is not the one we are deleting
This commit is contained in:
parent
12fe2249e1
commit
3c16044cb0
1 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,6 @@ void deleteGenerations(const Path & profile, const std::set<unsigned int> & gens
|
|||
|
||||
void deleteGenerationsGreaterThan(const Path & profile, int max, bool dryRun)
|
||||
{
|
||||
int max_keep = 0;
|
||||
PathLocks lock;
|
||||
|
||||
lockProfile(lock, profile);
|
||||
|
@ -172,7 +171,8 @@ void deleteGenerationsGreaterThan(const Path & profile, int max, bool dryRun)
|
|||
max--;
|
||||
continue;
|
||||
}
|
||||
deleteGeneration2(profile, i->number, dryRun);
|
||||
if (i->number != curGen)
|
||||
deleteGeneration2(profile, i->number, dryRun);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue