mirror of
https://github.com/NixOS/nix.git
synced 2025-12-11 19:41:04 +01:00
Replace Path with std::filesystem::path in libfetchers.
This commit is contained in:
parent
e761a9fb6d
commit
f0390758dd
15 changed files with 72 additions and 70 deletions
|
|
@ -486,7 +486,7 @@ void initLibStore(bool loadConfig)
|
|||
/* On macOS, don't use the per-session TMPDIR (as set e.g. by
|
||||
sshd). This breaks build users because they don't have access
|
||||
to the TMPDIR, in particular in ‘nix-store --serve’. */
|
||||
if (hasPrefix(defaultTempDir(), "/var/folders/"))
|
||||
if (hasPrefix(defaultTempDir().string(), "/var/folders/"))
|
||||
unsetenv("TMPDIR");
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public:
|
|||
/**
|
||||
* The directory where system configuration files are stored.
|
||||
*/
|
||||
Path nixConfDir;
|
||||
std::filesystem::path nixConfDir;
|
||||
|
||||
/**
|
||||
* A list of user configuration files to load.
|
||||
|
|
@ -292,7 +292,7 @@ public:
|
|||
|
||||
Setting<std::string> builders{
|
||||
this,
|
||||
"@" + nixConfDir + "/machines",
|
||||
"@" + nixConfDir.string() + "/machines",
|
||||
"builders",
|
||||
R"(
|
||||
A semicolon- or newline-separated list of build machines.
|
||||
|
|
|
|||
|
|
@ -1332,7 +1332,7 @@ std::pair<std::filesystem::path, AutoCloseFD> LocalStore::createTempDirInStore()
|
|||
/* There is a slight possibility that `tmpDir' gets deleted by
|
||||
the GC between createTempDir() and when we acquire a lock on it.
|
||||
We'll repeat until 'tmpDir' exists and we've locked it. */
|
||||
tmpDirFn = createTempDir(config->realStoreDir, "tmp");
|
||||
tmpDirFn = createTempDir(std::filesystem::path{config->realStoreDir.get()}, "tmp");
|
||||
tmpDirFd = openDirectory(tmpDirFn);
|
||||
if (!tmpDirFd) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ struct DarwinDerivationBuilder : DerivationBuilderImpl
|
|||
/* The tmpDir in scope points at the temporary build directory for our derivation. Some packages try different
|
||||
mechanisms to find temporary directories, so we want to open up a broader place for them to put their files,
|
||||
if needed. */
|
||||
Path globalTmpDir = canonPath(defaultTempDir(), true);
|
||||
Path globalTmpDir = canonPath(defaultTempDir().string(), true);
|
||||
|
||||
/* They don't like trailing slashes on subpath directives */
|
||||
while (!globalTmpDir.empty() && globalTmpDir.back() == '/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue