mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Merge pull request #13120 from Mic92/fix-quoting
replaceSymlink: fix quoting in error message
This commit is contained in:
commit
d5cefa625c
1 changed files with 2 additions and 2 deletions
|
@ -629,14 +629,14 @@ void replaceSymlink(const fs::path & target, const fs::path & link)
|
||||||
fs::create_symlink(target, tmp);
|
fs::create_symlink(target, tmp);
|
||||||
} catch (fs::filesystem_error & e) {
|
} catch (fs::filesystem_error & e) {
|
||||||
if (e.code() == std::errc::file_exists) continue;
|
if (e.code() == std::errc::file_exists) continue;
|
||||||
throw SysError("creating symlink '%1%' -> '%2%'", tmp, target);
|
throw SysError("creating symlink %1% -> %2%", tmp, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs::rename(tmp, link);
|
fs::rename(tmp, link);
|
||||||
} catch (fs::filesystem_error & e) {
|
} catch (fs::filesystem_error & e) {
|
||||||
if (e.code() == std::errc::file_exists) continue;
|
if (e.code() == std::errc::file_exists) continue;
|
||||||
throw SysError("renaming '%1%' to '%2%'", tmp, link);
|
throw SysError("renaming %1% to %2%", tmp, link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue