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)
|
void deleteGenerationsGreaterThan(const Path & profile, int max, bool dryRun)
|
||||||
{
|
{
|
||||||
int max_keep = 0;
|
|
||||||
PathLocks lock;
|
PathLocks lock;
|
||||||
|
|
||||||
lockProfile(lock, profile);
|
lockProfile(lock, profile);
|
||||||
|
@ -172,7 +171,8 @@ void deleteGenerationsGreaterThan(const Path & profile, int max, bool dryRun)
|
||||||
max--;
|
max--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
deleteGeneration2(profile, i->number, dryRun);
|
if (i->number != curGen)
|
||||||
|
deleteGeneration2(profile, i->number, dryRun);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue