mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
Merge pull request #10873 from siddhantk232/rm-createdirs
use `std::filesystem::create_directories` for createDirs
This commit is contained in:
commit
903acc7c0f
3 changed files with 10 additions and 27 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 (SystemError & 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
Add a link
Reference in a new issue