summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-12-02 12:09:57 +0100
committerMichael Albinus <michael.albinus@gmx.de>2017-12-02 12:09:57 +0100
commit1b351c8a479c571644cffec87a647257903188e0 (patch)
treeb2e2424498941503f519bf01252272b00bd2b911
parent77cf972592ee1c86ca330a42d4009f99bed1a349 (diff)
downloademacs-1b351c8a479c571644cffec87a647257903188e0.tar.gz
Revert Tramp commit from 2017-11-20
* lisp/net/tramp.el (tramp-drop-volume-letter) (tramp-handle-find-backup-file-name): Revert change from 2017-11-20. Emacs' `make-backup-file-name-1' handles this case now.
-rw-r--r--lisp/net/tramp.el35
1 files changed, 16 insertions, 19 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6b0b1da6eb6..124da173484 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1858,8 +1858,7 @@ letter into the file name. This function removes it."
(if (tramp-compat-file-name-quoted-p name)
'tramp-compat-file-name-quote 'identity)
(let ((name (tramp-compat-file-name-unquote name)))
- ;; A volume letter could occur also in encoded backup file names.
- (if (string-match "\\(\\`[[:alpha:]]:/\\|/!drive_[[:alpha:]]\\)" name)
+ (if (string-match "\\`[a-zA-Z]:/" name)
(replace-match "/" nil t name)
name)))))
@@ -3226,23 +3225,21 @@ User is always nil."
(defun tramp-handle-find-backup-file-name (filename)
"Like `find-backup-file-name' for Tramp files."
(with-parsed-tramp-file-name filename nil
- (mapcar
- 'tramp-drop-volume-letter
- (let ((backup-directory-alist
- (if tramp-backup-directory-alist
- (mapcar
- (lambda (x)
- (cons
- (car x)
- (if (and (stringp (cdr x))
- (file-name-absolute-p (cdr x))
- (not (tramp-tramp-file-p (cdr x))))
- (tramp-make-tramp-file-name
- method user domain host port (cdr x) hop)
- (cdr x))))
- tramp-backup-directory-alist)
- backup-directory-alist)))
- (tramp-run-real-handler 'find-backup-file-name (list filename))))))
+ (let ((backup-directory-alist
+ (if tramp-backup-directory-alist
+ (mapcar
+ (lambda (x)
+ (cons
+ (car x)
+ (if (and (stringp (cdr x))
+ (file-name-absolute-p (cdr x))
+ (not (tramp-tramp-file-p (cdr x))))
+ (tramp-make-tramp-file-name
+ method user domain host port (cdr x) hop)
+ (cdr x))))
+ tramp-backup-directory-alist)
+ backup-directory-alist)))
+ (tramp-run-real-handler 'find-backup-file-name (list filename)))))
(defun tramp-handle-insert-directory
(filename switches &optional wildcard full-directory-p)