summaryrefslogtreecommitdiff
path: root/henrietta-cache.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2013-10-29 19:58:21 +0100
committerPeter Bex <peter@more-magic.net>2013-10-29 19:58:21 +0100
commit629c45620fa23241a51594a68c80c9788f95d9b5 (patch)
treed4dbbf6e3fdad22d680a4148ed3b535209e7c56c /henrietta-cache.scm
parent3baf848081f76188093f5afa84dca610bd9e1925 (diff)
downloadhenrietta-cache-629c45620fa23241a51594a68c80c9788f95d9b5.tar.gz
Fix pax_global_header problem0.4.1
Diffstat (limited to 'henrietta-cache.scm')
-rw-r--r--henrietta-cache.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm
index 58d7f90..e5311b2 100644
--- a/henrietta-cache.scm
+++ b/henrietta-cache.scm
@@ -143,9 +143,14 @@ EOF
;; Some people extract to the current directory, some include the
;; directory
(let* ((contents (directory tmp-dir))
- (contents-dir (if (= 1 (length contents))
- (make-pathname tmp-dir (car contents))
- tmp-dir))
+ (contents-dir (match contents
+ ;; Silly pax archives contain this bogus entry.
+ ;; Some pax-aware tar(1)s skip it, others don't.
+ ((or (dir "pax_global_header")
+ ("pax_global_header" dir)
+ (dir))
+ (make-pathname tmp-dir dir))
+ (else tmp-dir)))
(cmd (sprintf "mv ~A/* ~A" (qs contents-dir) (qs cache-dir)))
(status (system cmd)))
(unless (zero? status)