summaryrefslogtreecommitdiff
path: root/henrietta-cache.scm
diff options
context:
space:
mode:
Diffstat (limited to 'henrietta-cache.scm')
-rw-r--r--henrietta-cache.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm
index 924b65a..1dc264c 100644
--- a/henrietta-cache.scm
+++ b/henrietta-cache.scm
@@ -1,4 +1,4 @@
-(use utils posix setup-api http-client matchable uri-common srfi-1)
+(use utils posix http-client matchable uri-common srfi-1)
(define (usage code)
(print #<#EOF
@@ -110,9 +110,12 @@ EOF
(let* ((contents (directory tmpdir))
(contents-dir (if (= 1 (length contents))
(make-pathname tmpdir (car contents))
- tmpdir)))
- (move-file contents-dir cache-dir)
- (system (sprintf "rm -rf ~A" (qs tmpdir))))))
+ tmpdir))
+ (cmd (sprintf "mv ~A/* ~A" (qs contents-dir) (qs cache-dir)))
+ (status (system cmd)))
+ (system (sprintf "rm -rf ~A" (qs tmpdir)))
+ (unless (zero? status)
+ (error "Got an error executing command" cmd)))))
((meta-file)
(condition-case
(let* ((meta (car (call-with-input-request uri #f read-file)))