From 629c45620fa23241a51594a68c80c9788f95d9b5 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Tue, 29 Oct 2013 19:58:21 +0100 Subject: Fix pax_global_header problem --- henrietta-cache.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'henrietta-cache.scm') 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) -- cgit v1.2.3