aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-08-08 16:47:29 +0200
committerMichael Albinus2019-08-08 16:47:29 +0200
commitf9beb2bfa9cdccde79793ab2ab8b88797b30b9f0 (patch)
tree9c887e00e2c5e8f481f7c5d77ff6b87d34937f6c
parent78ddf6ba96039920d9ac0086b8a87a8a068227ef (diff)
downloademacs-f9beb2bfa9cdccde79793ab2ab8b88797b30b9f0.tar.gz
emacs-f9beb2bfa9cdccde79793ab2ab8b88797b30b9f0.zip
Work on Tramp backward compatibility
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file) (tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Use `tramp-compat-directory-name-p'.
-rw-r--r--lisp/net/tramp-adb.el6
-rw-r--r--lisp/net/tramp-gvfs.el3
-rw-r--r--lisp/net/tramp-rclone.el3
-rw-r--r--lisp/net/tramp-sh.el3
-rw-r--r--lisp/net/tramp-smb.el5
-rw-r--r--lisp/net/tramp-sudoedit.el3
6 files changed, 15 insertions, 8 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 475f9a2e2b3..2192f7f0252 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -704,7 +704,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
704 (with-parsed-tramp-file-name (if t1 filename newname) nil 704 (with-parsed-tramp-file-name (if t1 filename newname) nil
705 (when (and (not ok-if-already-exists) (file-exists-p newname)) 705 (when (and (not ok-if-already-exists) (file-exists-p newname))
706 (tramp-error v 'file-already-exists newname)) 706 (tramp-error v 'file-already-exists newname))
707 (when (and (file-directory-p newname) (not (directory-name-p newname))) 707 (when (and (file-directory-p newname)
708 (not (tramp-compat-directory-name-p newname)))
708 (tramp-error v 'file-error "File is a directory %s" newname)) 709 (tramp-error v 'file-error "File is a directory %s" newname))
709 710
710 (with-tramp-progress-reporter 711 (with-tramp-progress-reporter
@@ -781,7 +782,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
781 (with-parsed-tramp-file-name (if t1 filename newname) nil 782 (with-parsed-tramp-file-name (if t1 filename newname) nil
782 (when (and (not ok-if-already-exists) (file-exists-p newname)) 783 (when (and (not ok-if-already-exists) (file-exists-p newname))
783 (tramp-error v 'file-already-exists newname)) 784 (tramp-error v 'file-already-exists newname))
784 (when (and (file-directory-p newname) (not (directory-name-p newname))) 785 (when (and (file-directory-p newname)
786 (not (tramp-compat-directory-name-p newname)))
785 (tramp-error v 'file-error "File is a directory %s" newname)) 787 (tramp-error v 'file-error "File is a directory %s" newname))
786 788
787 (with-tramp-progress-reporter 789 (with-tramp-progress-reporter
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 8cec5871cfc..f10476a7bc6 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -766,7 +766,8 @@ file names."
766 (with-parsed-tramp-file-name (if t1 filename newname) nil 766 (with-parsed-tramp-file-name (if t1 filename newname) nil
767 (when (and (not ok-if-already-exists) (file-exists-p newname)) 767 (when (and (not ok-if-already-exists) (file-exists-p newname))
768 (tramp-error v 'file-already-exists newname)) 768 (tramp-error v 'file-already-exists newname))
769 (when (and (file-directory-p newname) (not (directory-name-p newname))) 769 (when (and (file-directory-p newname)
770 (not (tramp-compat-directory-name-p newname)))
770 (tramp-error v 'file-error "File is a directory %s" newname)) 771 (tramp-error v 'file-error "File is a directory %s" newname))
771 772
772 (if (or (and equal-remote 773 (if (or (and equal-remote
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el
index e0fd8e34415..866e7791bf8 100644
--- a/lisp/net/tramp-rclone.el
+++ b/lisp/net/tramp-rclone.el
@@ -215,7 +215,8 @@ file names."
215 (with-parsed-tramp-file-name (if t1 filename newname) nil 215 (with-parsed-tramp-file-name (if t1 filename newname) nil
216 (when (and (not ok-if-already-exists) (file-exists-p newname)) 216 (when (and (not ok-if-already-exists) (file-exists-p newname))
217 (tramp-error v 'file-already-exists newname)) 217 (tramp-error v 'file-already-exists newname))
218 (when (and (file-directory-p newname) (not (directory-name-p newname))) 218 (when (and (file-directory-p newname)
219 (not (tramp-compat-directory-name-p newname)))
219 (tramp-error v 'file-error "File is a directory %s" newname)) 220 (tramp-error v 'file-error "File is a directory %s" newname))
220 221
221 (if (or (and t1 (not (tramp-rclone-file-name-p filename))) 222 (if (or (and t1 (not (tramp-rclone-file-name-p filename)))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 54bf2ba773e..6e18e7330c7 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1993,7 +1993,8 @@ file names."
1993 (with-parsed-tramp-file-name (if t1 filename newname) nil 1993 (with-parsed-tramp-file-name (if t1 filename newname) nil
1994 (when (and (not ok-if-already-exists) (file-exists-p newname)) 1994 (when (and (not ok-if-already-exists) (file-exists-p newname))
1995 (tramp-error v 'file-already-exists newname)) 1995 (tramp-error v 'file-already-exists newname))
1996 (when (and (file-directory-p newname) (not (directory-name-p newname))) 1996 (when (and (file-directory-p newname)
1997 (not (tramp-compat-directory-name-p newname)))
1997 (tramp-error v 'file-error "File is a directory %s" newname)) 1998 (tramp-error v 'file-error "File is a directory %s" newname))
1998 1999
1999 (with-tramp-progress-reporter 2000 (with-tramp-progress-reporter
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 594463d77fd..b619e77a52a 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -589,7 +589,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
589 (when (and (not ok-if-already-exists) (file-exists-p newname)) 589 (when (and (not ok-if-already-exists) (file-exists-p newname))
590 (tramp-error v 'file-already-exists newname)) 590 (tramp-error v 'file-already-exists newname))
591 (when (and (file-directory-p newname) 591 (when (and (file-directory-p newname)
592 (not (directory-name-p newname))) 592 (not (tramp-compat-directory-name-p newname)))
593 (tramp-error v 'file-error "File is a directory %s" newname)) 593 (tramp-error v 'file-error "File is a directory %s" newname))
594 594
595 ;; We must also flush the cache of the directory, because 595 ;; We must also flush the cache of the directory, because
@@ -1334,7 +1334,8 @@ component is used as the target of the symlink."
1334 (if (tramp-tramp-file-p filename) filename newname) nil 1334 (if (tramp-tramp-file-p filename) filename newname) nil
1335 (when (and (not ok-if-already-exists) (file-exists-p newname)) 1335 (when (and (not ok-if-already-exists) (file-exists-p newname))
1336 (tramp-error v 'file-already-exists newname)) 1336 (tramp-error v 'file-already-exists newname))
1337 (when (and (file-directory-p newname) (not (directory-name-p newname))) 1337 (when (and (file-directory-p newname)
1338 (not (tramp-compat-directory-name-p newname)))
1338 (tramp-error v 'file-error "File is a directory %s" newname)) 1339 (tramp-error v 'file-error "File is a directory %s" newname))
1339 1340
1340 (with-tramp-progress-reporter 1341 (with-tramp-progress-reporter
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 0ec98bb0691..5d5a3f1f75c 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -243,7 +243,8 @@ absolute file names."
243 (with-parsed-tramp-file-name (if t1 filename newname) nil 243 (with-parsed-tramp-file-name (if t1 filename newname) nil
244 (when (and (not ok-if-already-exists) (file-exists-p newname)) 244 (when (and (not ok-if-already-exists) (file-exists-p newname))
245 (tramp-error v 'file-already-exists newname)) 245 (tramp-error v 'file-already-exists newname))
246 (when (and (file-directory-p newname) (not (directory-name-p newname))) 246 (when (and (file-directory-p newname)
247 (not (tramp-compat-directory-name-p newname)))
247 (tramp-error v 'file-error "File is a directory %s" newname)) 248 (tramp-error v 'file-error "File is a directory %s" newname))
248 249
249 (if (or (and (file-remote-p filename) (not t1)) 250 (if (or (and (file-remote-p filename) (not t1))