commit 61e7547
chld
·
2026-09-13 13:01:10 +0000 UTC
parent 4a2f190
delete before copy only when file already exists
1 files changed,
+2,
-1
M
pkg.scm
M
pkg.scm
+2,
-1
1@@ -101,7 +101,8 @@
2 (let fc ((n 0))
3 (unless (= n (length df))
4 (unless (string-suffix? "/" (list-ref df n))
5- (delete-file (list-ref df n))
6+ (when (file-exists? (list-ref df n))
7+ (delete-file (list-ref df n)))
8 (copy-file (string-append dp (list-ref df n)) (list-ref df n))
9 )
10 (fc (+ n 1))))