Commit d4ec0200 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(tar-copy): Inhibit use of jka-compr handler

when both to- and from- files would use it.
parent 88766961
......@@ -789,9 +789,20 @@ the current tar-entry."
(name (tar-header-name tokens))
(size (tar-header-size tokens))
(start (+ (tar-desc-data-start descriptor) tar-header-offset -1))
(end (+ start size)))
(end (+ start size))
(inhibit-file-name-handlers inhibit-file-name-handlers)
(inhibit-file-name-operation inhibit-file-name-operation))
;; Inhibit compressing a subfile again if *both* name and
;; to-file are handled by jka-compr
(if (and (eq (find-file-name-handler name 'write-region) 'jka-compr-handler)
(eq (find-file-name-handler to-file 'write-region) 'jka-compr-handler))
(setq inhibit-file-name-handlers
(cons 'jka-compr-handler
(and (eq inhibit-file-name-operation 'write-region)
inhibit-file-name-operation 'write-region))
(write-region start end to-file))
(message "Copied tar entry %s to %s" name to-file)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment