mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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'.
This commit is contained in:
parent
78ddf6ba96
commit
f9beb2bfa9
6 changed files with 15 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue