1
1
Fork 0
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:
Eelco Dolstra 2024-06-24 14:54:37 +02:00 committed by GitHub
commit 903acc7c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 27 deletions

View file

@ -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);