Commit 08cf935b authored by Michael Albinus's avatar Michael Albinus

* net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the

`rename' case, check whether source directory has set the sticky bit.
parent 1f73d6c6
......@@ -7,6 +7,8 @@
`remote-file-name-inhibit-cache' to nil in the second pass.
(tramp-find-executable): Do not call "which" on SunOS.
(tramp-send-command-and-check): Fix docstring.
(tramp-do-copy-or-rename-file-directly): In the `rename' case,
check whether source directory has set the sticky bit.
2014-03-24 Barry O'Reilly <gundaetiapo@gmail.com>
......
......@@ -2110,6 +2110,12 @@ the uid and gid from FILENAME."
;; We can do it directly.
((let (file-name-handler-alist)
(and (file-readable-p localname1)
;; No sticky bit when renaming.
(or (eq op 'copy)
(zerop
(logand
(file-modes (file-name-directory localname1))
(tramp-compat-octal-to-decimal "1000"))))
(file-writable-p (file-name-directory localname2))
(or (file-directory-p localname2)
(file-writable-p localname2))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment