1
1
Fork 0
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:
Nick Hu 2024-03-12 11:41:08 +00:00 committed by github-actions[bot]
parent e8334d110c
commit 1ba10f66cb
7 changed files with 240 additions and 0 deletions

View file

@ -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);