mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Merge pull request #10852 from siddhantk232/add-interrupts
add call to `checkInterrupt` in a bunch of places
This commit is contained in:
commit
ef140c25d1
13 changed files with 29 additions and 3 deletions
|
@ -1417,6 +1417,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
|
|||
printInfo("checking link hashes...");
|
||||
|
||||
for (auto & link : std::filesystem::directory_iterator{linksDir}) {
|
||||
checkInterrupt();
|
||||
auto name = link.path().filename();
|
||||
printMsg(lvlTalkative, "checking contents of '%s'", name);
|
||||
PosixSourceAccessor accessor;
|
||||
|
@ -1509,6 +1510,7 @@ LocalStore::VerificationResult LocalStore::verifyAllValidPaths(RepairFlag repair
|
|||
invalid states.
|
||||
*/
|
||||
for (auto & i : std::filesystem::directory_iterator{realStoreDir.to_string()}) {
|
||||
checkInterrupt();
|
||||
try {
|
||||
storePathsInStoreDir.insert({i.path().filename().string()});
|
||||
} catch (BadStorePath &) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue