diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2023-05-15 16:25:23 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2023-05-15 16:25:23 +0200 |
commit | 8eb129a2ca4643a78c7afecc3226f183a1deb143 (patch) | |
tree | 03154f585ecd2435482c97e004f5aa413c38b438 /lisp/net/tramp-smb.el | |
parent | 98e8c0b2486faeba45bce68d1c20a5019ca51f71 (diff) | |
download | emacs-8eb129a2ca4643a78c7afecc3226f183a1deb143.tar.gz |
Fix some minor Tramp problems
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-exists-p): New defun.
(tramp-crypt-file-name-handler-alist): Add it.
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): Flush proper file
properties.
* test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs28-p):
New defun.
(tramp-archive-test48-auto-load): Extend test.
Diffstat (limited to 'lisp/net/tramp-smb.el')
-rw-r--r-- | lisp/net/tramp-smb.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 1182501e820..dab85c5160e 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -637,9 +637,6 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (not (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 - ;; `file-attributes' reads the values from there. - (tramp-flush-file-properties v localname) (unless (tramp-smb-get-share v) (tramp-error v 'file-error "Target `%s' must contain a share name" newname)) @@ -648,7 +645,12 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (tramp-smb-shell-quote-argument filename) (tramp-smb-shell-quote-localname v))) (tramp-error - v 'file-error "Cannot copy `%s' to `%s'" filename newname))))) + v 'file-error "Cannot copy `%s' to `%s'" filename newname)) + + ;; When newname did exist, we have wrong cached values. + (when (tramp-tramp-file-p newname) + (with-parsed-tramp-file-name newname v2 + (tramp-flush-file-properties v2 v2-localname)))))) ;; KEEP-DATE handling. (when keep-date |