aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-25 20:27:07 +0000
committerRichard M. Stallman1995-07-25 20:27:07 +0000
commitd4ec0200803c5e90502e55e4e1c71b93f296c992 (patch)
treec551098953c4dd710b48dc46e8d1e4136246133e
parent88766961a3fba6124141677864ea248359729a13 (diff)
downloademacs-d4ec0200803c5e90502e55e4e1c71b93f296c992.tar.gz
emacs-d4ec0200803c5e90502e55e4e1c71b93f296c992.zip
(tar-copy): Inhibit use of jka-compr handler
when both to- and from- files would use it.
-rw-r--r--lisp/tar-mode.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index dfc555c97e9..e0cdf304b72 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -789,9 +789,20 @@ the current tar-entry."
789 (name (tar-header-name tokens)) 789 (name (tar-header-name tokens))
790 (size (tar-header-size tokens)) 790 (size (tar-header-size tokens))
791 (start (+ (tar-desc-data-start descriptor) tar-header-offset -1)) 791 (start (+ (tar-desc-data-start descriptor) tar-header-offset -1))
792 (end (+ start size))) 792 (end (+ start size))
793 (inhibit-file-name-handlers inhibit-file-name-handlers)
794 (inhibit-file-name-operation inhibit-file-name-operation))
793 (save-restriction 795 (save-restriction
794 (widen) 796 (widen)
797 ;; Inhibit compressing a subfile again if *both* name and
798 ;; to-file are handled by jka-compr
799 (if (and (eq (find-file-name-handler name 'write-region) 'jka-compr-handler)
800 (eq (find-file-name-handler to-file 'write-region) 'jka-compr-handler))
801 (setq inhibit-file-name-handlers
802 (cons 'jka-compr-handler
803 (and (eq inhibit-file-name-operation 'write-region)
804 inhibit-file-name-handlers))
805 inhibit-file-name-operation 'write-region))
795 (write-region start end to-file)) 806 (write-region start end to-file))
796 (message "Copied tar entry %s to %s" name to-file))) 807 (message "Copied tar entry %s to %s" name to-file)))
797 808