aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2022-08-08 16:48:17 +0200
committerGitHub <noreply@github.com>2022-08-08 16:48:17 +0200
commit73fde9eed06dfdef5d37b3d798cfc98a542a4d73 (patch)
tree564c10124f5c551448320ef21605d50f08a47ceb /src/libstore/gc.cc
parent3a09a32b27bb4251fb5060d6ce5cd4cbca66049c (diff)
parent5192bb093a7f65c4ad5ac63dbd7f00ef7e026b2f (diff)
Merge pull request #6280 from thufschmitt/fix-mv-in-different-filesystems
Fix mv in different filesystems
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index d58ed78b1..4c1a82279 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -39,9 +39,7 @@ static void makeSymlink(const Path & link, const Path & target)
createSymlink(target, tempLink);
/* Atomically replace the old one. */
- if (rename(tempLink.c_str(), link.c_str()) == -1)
- throw SysError("cannot rename '%1%' to '%2%'",
- tempLink , link);
+ renameFile(tempLink, link);
}