mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
use createDirs consistently everywhere
(cherry picked from commit a8217f2642
)
This commit is contained in:
parent
61f8fd3e9c
commit
076fa01a84
2 changed files with 3 additions and 7 deletions
|
@ -23,11 +23,7 @@ void builtinUnpackChannel(
|
||||||
throw Error("channelName is not allowed to contain filesystem separators, got %1%", channelName);
|
throw Error("channelName is not allowed to contain filesystem separators, got %1%", channelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
createDirs(out);
|
||||||
fs::create_directories(out);
|
|
||||||
} catch (fs::filesystem_error &) {
|
|
||||||
throw SysError("creating directory '%1%'", out.string());
|
|
||||||
}
|
|
||||||
|
|
||||||
unpackTarfile(src, out);
|
unpackTarfile(src, out);
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ void unpackTarfile(Source & source, const fs::path & destDir)
|
||||||
{
|
{
|
||||||
auto archive = TarArchive(source);
|
auto archive = TarArchive(source);
|
||||||
|
|
||||||
fs::create_directories(destDir);
|
createDirs(destDir);
|
||||||
extract_archive(archive, destDir);
|
extract_archive(archive, destDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ void unpackTarfile(const fs::path & tarFile, const fs::path & destDir)
|
||||||
{
|
{
|
||||||
auto archive = TarArchive(tarFile);
|
auto archive = TarArchive(tarFile);
|
||||||
|
|
||||||
fs::create_directories(destDir);
|
createDirs(destDir);
|
||||||
extract_archive(archive, destDir);
|
extract_archive(archive, destDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue