mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
fix: catch filesystem_error
thrown by createDirs
This commit is contained in:
parent
25b0242ca6
commit
7a21432e77
1 changed files with 2 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "signals.hh"
|
||||
#include "users.hh"
|
||||
|
||||
#include <filesystem>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
@ -1303,7 +1304,7 @@ ref<Store> openStore(StoreReference && storeURI)
|
|||
if (!pathExists(chrootStore)) {
|
||||
try {
|
||||
createDirs(chrootStore);
|
||||
} catch (Error & e) {
|
||||
} catch (std::filesystem::filesystem_error & e) {
|
||||
return std::make_shared<LocalStore>(params);
|
||||
}
|
||||
warn("'%s' does not exist, so Nix will use '%s' as a chroot store", stateDir, chrootStore);
|
||||
|
|
Loading…
Add table
Reference in a new issue