aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2014-03-25 10:49:37 +0100
committerMichael Albinus2014-03-25 10:49:37 +0100
commit08cf935b84a0778fdf60992960f2c5a6dbad4d82 (patch)
treecc1958c1fa542e16a5c04d302e0b4b7e7a1186c1 /lisp/net
parent1f73d6c67588cc489b3e3b445710d2fd06792170 (diff)
downloademacs-08cf935b84a0778fdf60992960f2c5a6dbad4d82.tar.gz
emacs-08cf935b84a0778fdf60992960f2c5a6dbad4d82.zip
* net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the
`rename' case, check whether source directory has set the sticky bit.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp-sh.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9cc913724fd..22ea7714743 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2110,6 +2110,12 @@ the uid and gid from FILENAME."
2110 ;; We can do it directly. 2110 ;; We can do it directly.
2111 ((let (file-name-handler-alist) 2111 ((let (file-name-handler-alist)
2112 (and (file-readable-p localname1) 2112 (and (file-readable-p localname1)
2113 ;; No sticky bit when renaming.
2114 (or (eq op 'copy)
2115 (zerop
2116 (logand
2117 (file-modes (file-name-directory localname1))
2118 (tramp-compat-octal-to-decimal "1000"))))
2113 (file-writable-p (file-name-directory localname2)) 2119 (file-writable-p (file-name-directory localname2))
2114 (or (file-directory-p localname2) 2120 (or (file-directory-p localname2)
2115 (file-writable-p localname2)))) 2121 (file-writable-p localname2))))