mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Fix windows build
PR #12767 accidentally broke it.
(cherry picked from commit 99041b4d84
)
This commit is contained in:
parent
8adc1f3011
commit
d92b509bda
3 changed files with 6 additions and 8 deletions
|
@ -213,7 +213,7 @@ LocalStore::LocalStore(
|
|||
state->stmts = std::make_unique<State::Stmts>();
|
||||
|
||||
/* Create missing state directories if they don't already exist. */
|
||||
createDirs(realStoreDir);
|
||||
createDirs(realStoreDir.get());
|
||||
if (readOnly) {
|
||||
experimentalFeatureSettings.require(Xp::ReadOnlyLocalStore);
|
||||
} else {
|
||||
|
|
|
@ -419,12 +419,12 @@ void createDir(const Path & path, mode_t mode)
|
|||
throw SysError("creating directory '%1%'", path);
|
||||
}
|
||||
|
||||
void createDirs(const Path & path)
|
||||
void createDirs(const fs::path & path)
|
||||
{
|
||||
try {
|
||||
fs::create_directories(path);
|
||||
} catch (fs::filesystem_error & e) {
|
||||
throw SysError("creating directory '%1%'", path);
|
||||
throw SysError("creating directory '%1%'", path.string());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -171,12 +171,10 @@ void deletePath(const std::filesystem::path & path, uint64_t & bytesFreed);
|
|||
|
||||
/**
|
||||
* Create a directory and all its parents, if necessary.
|
||||
*
|
||||
* Wrapper around `std::filesystem::create_directories` to handle exceptions.
|
||||
*/
|
||||
void createDirs(const Path & path);
|
||||
inline void createDirs(PathView path)
|
||||
{
|
||||
return createDirs(Path(path));
|
||||
}
|
||||
void createDirs(const std::filesystem::path & path);
|
||||
|
||||
/**
|
||||
* Create a single directory.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue