]> git.eshelyaron.com Git - emacs.git/commitdiff
Work on Tramp backward compatibility
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 8 Aug 2019 14:47:29 +0000 (16:47 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 8 Aug 2019 14:47:29 +0000 (16:47 +0200)
* 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'.

lisp/net/tramp-adb.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-rclone.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp-sudoedit.el

index 475f9a2e2b3c956efb655af64abd05217ecce14a..2192f7f0252206947c997cc530c43204c1912310 100644 (file)
@@ -704,7 +704,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
       (with-parsed-tramp-file-name (if t1 filename newname) nil
        (when (and (not ok-if-already-exists) (file-exists-p newname))
          (tramp-error v 'file-already-exists newname))
-       (when (and (file-directory-p newname) (not (directory-name-p newname)))
+       (when (and (file-directory-p newname)
+                  (not (tramp-compat-directory-name-p newname)))
          (tramp-error v 'file-error "File is a directory %s" newname))
 
        (with-tramp-progress-reporter
@@ -781,7 +782,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
       (with-parsed-tramp-file-name (if t1 filename newname) nil
        (when (and (not ok-if-already-exists) (file-exists-p newname))
          (tramp-error v 'file-already-exists newname))
-       (when (and (file-directory-p newname) (not (directory-name-p newname)))
+       (when (and (file-directory-p newname)
+                  (not (tramp-compat-directory-name-p newname)))
          (tramp-error v 'file-error "File is a directory %s" newname))
 
        (with-tramp-progress-reporter
index 8cec5871cfc1ff6537e3dab252426e5b681bdc67..f10476a7bc65d607c6e451208730180f5fecaa70 100644 (file)
@@ -766,7 +766,8 @@ file names."
       (with-parsed-tramp-file-name (if t1 filename newname) nil
        (when (and (not ok-if-already-exists) (file-exists-p newname))
          (tramp-error v 'file-already-exists newname))
-       (when (and (file-directory-p newname) (not (directory-name-p newname)))
+       (when (and (file-directory-p newname)
+                  (not (tramp-compat-directory-name-p newname)))
          (tramp-error v 'file-error "File is a directory %s" newname))
 
        (if (or (and equal-remote
index e0fd8e3441531c887f4e4b29399a63ff57e3b1d9..866e7791bf8930fb5e908d946bd7346564a013d9 100644 (file)
@@ -215,7 +215,8 @@ file names."
       (with-parsed-tramp-file-name (if t1 filename newname) nil
        (when (and (not ok-if-already-exists) (file-exists-p newname))
          (tramp-error v 'file-already-exists newname))
-       (when (and (file-directory-p newname) (not (directory-name-p newname)))
+       (when (and (file-directory-p newname)
+                  (not (tramp-compat-directory-name-p newname)))
          (tramp-error v 'file-error "File is a directory %s" newname))
 
        (if (or (and t1 (not (tramp-rclone-file-name-p filename)))
index 54bf2ba773ef73952662e5bd7cbc1fef2f84ae48..6e18e7330c772069c2f0b688035351c06d881be0 100644 (file)
@@ -1993,7 +1993,8 @@ file names."
       (with-parsed-tramp-file-name (if t1 filename newname) nil
        (when (and (not ok-if-already-exists) (file-exists-p newname))
          (tramp-error v 'file-already-exists newname))
-       (when (and (file-directory-p newname) (not (directory-name-p newname)))
+       (when (and (file-directory-p newname)
+                  (not (tramp-compat-directory-name-p newname)))
          (tramp-error v 'file-error "File is a directory %s" newname))
 
        (with-tramp-progress-reporter
index 594463d77fda9d661152f6b366ff5046581ef680..b619e77a52a350cfb31645215cf0330bf5748293 100644 (file)
@@ -589,7 +589,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
            (when (and (not ok-if-already-exists) (file-exists-p newname))
              (tramp-error v 'file-already-exists newname))
            (when (and (file-directory-p newname)
-                      (not (directory-name-p newname)))
+                      (not (tramp-compat-directory-name-p newname)))
              (tramp-error v 'file-error "File is a directory %s" newname))
 
            ;; We must also flush the cache of the directory, because
@@ -1334,7 +1334,8 @@ component is used as the target of the symlink."
       (if (tramp-tramp-file-p filename) filename newname) nil
     (when (and (not ok-if-already-exists) (file-exists-p newname))
       (tramp-error v 'file-already-exists newname))
-    (when (and (file-directory-p newname) (not (directory-name-p newname)))
+    (when (and (file-directory-p newname)
+              (not (tramp-compat-directory-name-p newname)))
       (tramp-error v 'file-error "File is a directory %s" newname))
 
     (with-tramp-progress-reporter
index 0ec98bb06910ee6e3e0b23f98b83c4c7528ad352..5d5a3f1f75cb5eb24157c4e75b044692cfc8d3b4 100644 (file)
@@ -243,7 +243,8 @@ absolute file names."
       (with-parsed-tramp-file-name (if t1 filename newname) nil
        (when (and (not ok-if-already-exists) (file-exists-p newname))
          (tramp-error v 'file-already-exists newname))
-       (when (and (file-directory-p newname) (not (directory-name-p newname)))
+       (when (and (file-directory-p newname)
+                  (not (tramp-compat-directory-name-p newname)))
          (tramp-error v 'file-error "File is a directory %s" newname))
 
        (if (or (and (file-remote-p filename) (not t1))