mirror of
https://github.com/NixOS/nix.git
synced 2025-11-25 03:39:36 +01:00
add call to checkInterrupt in a bunch of places
This brings back the old behaviour. We check for interrupts in places that may iterate over wide directories.
This commit is contained in:
parent
1623249745
commit
8f1a26667e
13 changed files with 29 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "profiles.hh"
|
||||
#include "signals.hh"
|
||||
#include "store-api.hh"
|
||||
#include "local-fs-store.hh"
|
||||
#include "users.hh"
|
||||
|
|
@ -38,6 +39,7 @@ std::pair<Generations, std::optional<GenerationNumber>> findGenerations(Path pro
|
|||
auto profileName = std::string(baseNameOf(profile));
|
||||
|
||||
for (auto & i : std::filesystem::directory_iterator{profileDir}) {
|
||||
checkInterrupt();
|
||||
if (auto n = parseName(profileName, i.path().filename().string())) {
|
||||
auto path = i.path().string();
|
||||
gens.push_back({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue