summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-archive.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2019-04-26 12:31:50 +0200
committerMichael Albinus <michael.albinus@gmx.de>2019-04-26 12:31:50 +0200
commitcc70501a3a77e2cb8649eee0f0c03689e8232a68 (patch)
treecb06da7d7601245cb381b13de7339d4563926580 /lisp/net/tramp-archive.el
parent83cdf7bf15d8f80fdc94e2de2ba96323f1d30101 (diff)
downloademacs-cc70501a3a77e2cb8649eee0f0c03689e8232a68.tar.gz
emacs-cc70501a3a77e2cb8649eee0f0c03689e8232a68.tar.bz2
emacs-cc70501a3a77e2cb8649eee0f0c03689e8232a68.zip
Handle quoted file names in tramp-archive.el
* lisp/net/tramp-archive.el (tramp-archive-file-name-p): Suppress quoted file names. (tramp-archive-file-name-handler): Handle quoted file names. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p): Add optional TOP argument.
Diffstat (limited to 'lisp/net/tramp-archive.el')
-rw-r--r--lisp/net/tramp-archive.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index ba4c26cdf2f..b096edc4b36 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -318,10 +318,11 @@ pass to the OPERATION."
operation args))
(archive (tramp-archive-file-name-archive filename)))
- ;; The file archive could be a directory, see Bug#30293.
- (if (and archive
- (tramp-archive-run-real-handler
- #'file-directory-p (list archive)))
+ ;; `filename' could be a quoted file name. Or the file
+ ;; archive could be a directory, see Bug#30293.
+ (if (or (null archive)
+ (tramp-archive-run-real-handler
+ #'file-directory-p (list archive)))
(tramp-archive-run-real-handler operation args)
;; Now run the handler.
(let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods))
@@ -384,6 +385,8 @@ pass to the OPERATION."
(defun tramp-archive-file-name-p (name)
"Return t if NAME is a string with archive file name syntax."
(and (stringp name)
+ ;; `tramp-archive-file-name-regexp' does not suppress quoted file names.
+ (not (tramp-compat-file-name-quoted-p name t))
;; We cannot use `string-match-p', the matches are used.
(string-match tramp-archive-file-name-regexp name)
t))