summaryrefslogtreecommitdiff
path: root/gnu/home
diff options
context:
space:
mode:
authorNicolas Graves <[email protected]>2024-12-14 12:38:14 +0100
committerLudovic Courtès <[email protected]>2024-12-23 20:45:32 +0100
commit4b9b223bff65645b61666df48c12fd1a4f735b0f (patch)
tree5bef8898c281cd9d2c84f44cb40eb2d2205fb681 /gnu/home
parentf1c2681542693caf9846c3ecbeaf73d7ec243f64 (diff)
gnu: home: Replace rename in update-symlinks scripts.
* gnu/home/services/symlink-manager.scm (update-symlinks): Use copy-file and delete-file instead of rename-file to avoid an error when the target and backup are not in the same filesystem. Signed-off-by: Ludovic Courtès <[email protected]>
Diffstat (limited to 'gnu/home')
-rw-r--r--gnu/home/services/symlink-manager.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
index 560e03a839..d7b22d7fba 100644
--- a/gnu/home/services/symlink-manager.scm
+++ b/gnu/home/services/symlink-manager.scm
@@ -106,7 +106,8 @@ subdirectory from XDG_CONFIG_HOME to generate a target path."
(mkdir-p backup-directory)
(format #t (G_ "Backing up ~a...") (target-file file))
(mkdir-p (dirname backup))
- (rename-file (target-file file) backup)
+ (copy-file (target-file file) backup)
+ (delete-file (target-file file))
(display (G_ " done\n")))
(define (cleanup-symlinks home-generation)