diff --git a/modules/rosenthal/home/services/writable-files-manager.scm b/modules/rosenthal/home/services/writable-files-manager.scm index d5aaa81..5e75626 100644 --- a/modules/rosenthal/home/services/writable-files-manager.scm +++ b/modules/rosenthal/home/services/writable-files-manager.scm @@ -146,8 +146,9 @@ subdirectory from XDG_CONFIG_HOME to generate a target path." ;; we'll create later, it will be backed up later during ;; create-writable-files phase. (if (or (symlink-to-store? target) - (equal? (file-hash* source) - (file-hash* target))) + (equal? + (file-hash* (if (symbolic-link? target) file source)) + (file-hash* target))) (begin (format #t (G_ "Removing ~a...") target) (delete-file target) @@ -213,7 +214,8 @@ subdirectory from XDG_CONFIG_HOME to generate a target path." (backup-file (strip file))) (format #t (G_ "Copying ~a -> ~a...") source target) - (if (file-is-directory? source) + (if (or (not (file-exists? source)) + (file-is-directory? source)) (symlink source target) (begin (copy-file source target)