* net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the
`rename' case, check whether source directory has set the sticky bit.
This commit is contained in:
parent
1f73d6c675
commit
08cf935b84
2 changed files with 8 additions and 0 deletions
|
@ -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))))
|
||||
|
|
Loading…
Add table
Reference in a new issue