summaryrefslogtreecommitdiff
path: root/henrietta-cache.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2011-09-14 21:58:02 +0200
committerPeter Bex <peter@more-magic.net>2011-09-14 21:58:02 +0200
commit53c4c002dd0126830ec75bbf8bdf37fc6a99d0a2 (patch)
treef605334ab9ab3c8a0c2fefd5167d3c677b6957c7 /henrietta-cache.scm
parentbf46c1aa37418069eb457f0d16b85ffcebc9dbba (diff)
downloadhenrietta-cache-53c4c002dd0126830ec75bbf8bdf37fc6a99d0a2.tar.gz
Fix moving files for real
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)))