From 2045c4156b58d5df6a98346e7ee3c2fd42f8d330 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Thu, 12 Sep 2019 08:11:02 +0200 Subject: Fix sloppy code dealing with tmpdir parent deletion Somehow this now causes an exception to be raised when the temp dir was the contents dir, because move-to-cache already removes that directory. --- henrietta-cache.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/henrietta-cache.scm b/henrietta-cache.scm index 9daa883..15921af 100644 --- a/henrietta-cache.scm +++ b/henrietta-cache.scm @@ -169,7 +169,8 @@ EOF (make-pathname tmp-dir dir)) (else tmp-dir)))) (move-to-cache contents-dir cache-dir) - (delete-directory tmp-dir #t) ; sloppy; don't know which dir selected + (unless (eq? contents-dir tmp-dir) + (delete-directory tmp-dir #t)) ; remove parent if needed (delete-file tmp-file) )))) (define (download-release distribution-file-type uri cache-dir) -- cgit v1.2.3