mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Improve use of "touch" in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-touch): Set connection property "touch-h". (tramp-sh-handle-set-file-times): Use it.
This commit is contained in:
parent
4a3b6daf76
commit
6a018a2d7e
1 changed files with 12 additions and 1 deletions
|
|
@ -1601,7 +1601,10 @@ of."
|
|||
"-t %s"
|
||||
(format-time-string "%Y%m%d%H%M.%S" (tramp-defined-time time) t))
|
||||
"")
|
||||
(if (eq flag 'nofollow) "-h" "")
|
||||
(if (and (eq flag 'nofollow)
|
||||
(tramp-get-connection-property v "touch-h"))
|
||||
"-h"
|
||||
"")
|
||||
(tramp-shell-quote-argument localname))))))
|
||||
|
||||
(defun tramp-sh-handle-get-home-directory (vec &optional user)
|
||||
|
|
@ -5892,6 +5895,14 @@ Nonexistent directories are removed from spec."
|
|||
result
|
||||
(format-time-string "%Y%m%d%H%M.%S")
|
||||
(tramp-file-local-name tmpfile))))
|
||||
(tramp-set-connection-property
|
||||
vec "touch-h"
|
||||
(tramp-send-command-and-check
|
||||
vec
|
||||
(format
|
||||
"%s -h %s"
|
||||
result
|
||||
(tramp-file-local-name tmpfile))))
|
||||
(delete-file tmpfile))
|
||||
result)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue