mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Merge pull request #12794 from obsidiansystems/fix-windows-build
Fix windows build
This commit is contained in:
commit
3f13cc0f87
3 changed files with 5 additions and 10 deletions
|
@ -115,7 +115,7 @@ LocalStore::LocalStore(
|
||||||
state->stmts = std::make_unique<State::Stmts>();
|
state->stmts = std::make_unique<State::Stmts>();
|
||||||
|
|
||||||
/* Create missing state directories if they don't already exist. */
|
/* Create missing state directories if they don't already exist. */
|
||||||
createDirs(realStoreDir);
|
createDirs(realStoreDir.get());
|
||||||
if (readOnly) {
|
if (readOnly) {
|
||||||
experimentalFeatureSettings.require(Xp::ReadOnlyLocalStore);
|
experimentalFeatureSettings.require(Xp::ReadOnlyLocalStore);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -477,12 +477,12 @@ void createDir(const Path & path, mode_t mode)
|
||||||
throw SysError("creating directory '%1%'", path);
|
throw SysError("creating directory '%1%'", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void createDirs(const Path & path)
|
void createDirs(const fs::path & path)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
fs::create_directories(path);
|
fs::create_directories(path);
|
||||||
} catch (fs::filesystem_error & e) {
|
} catch (fs::filesystem_error & e) {
|
||||||
throw SysError("creating directory '%1%'", path);
|
throw SysError("creating directory '%1%'", path.string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,14 +231,9 @@ void deletePath(const std::filesystem::path & path, uint64_t & bytesFreed);
|
||||||
/**
|
/**
|
||||||
* Create a directory and all its parents, if necessary.
|
* Create a directory and all its parents, if necessary.
|
||||||
*
|
*
|
||||||
* In the process of being deprecated for
|
* Wrapper around `std::filesystem::create_directories` to handle exceptions.
|
||||||
* `std::filesystem::create_directories`.
|
|
||||||
*/
|
*/
|
||||||
void createDirs(const Path & path);
|
void createDirs(const std::filesystem::path & path);
|
||||||
inline void createDirs(PathView path)
|
|
||||||
{
|
|
||||||
return createDirs(Path(path));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a single directory.
|
* Create a single directory.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue