mirror of
https://github.com/NixOS/nix.git
synced 2025-12-22 17:01:08 +01:00
Manual backport of f8170ce9f1 to fix CVE-2024-27297
(cherry picked from commit 3e99257053)
This commit is contained in:
parent
e8334d110c
commit
1ba10f66cb
7 changed files with 240 additions and 0 deletions
|
|
@ -144,6 +144,11 @@ void copy(const fs::directory_entry & from, const fs::path & to, bool andDelete)
|
|||
}
|
||||
}
|
||||
|
||||
void copyFile(const Path & oldPath, const Path & newPath, bool andDelete)
|
||||
{
|
||||
return copy(fs::directory_entry(fs::path(oldPath)), fs::path(newPath), andDelete);
|
||||
}
|
||||
|
||||
void renameFile(const Path & oldName, const Path & newName)
|
||||
{
|
||||
fs::rename(oldName, newName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue