mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
fix: catch filesystem_error
thrown by createDirs
This commit is contained in:
parent
25b0242ca6
commit
7a21432e77
@ -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…
Reference in New Issue
Block a user