mirror of
https://github.com/NixOS/nix.git
synced 2025-04-16 06:08:03 +00:00
Merge pull request #12795 from NixOS/mergify/bp/2.24-maintenance/pr-12794
Fix windows build (backport #12794)
This commit is contained in:
commit
e1dad7daa5
@ -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…
Reference in New Issue
Block a user