emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116858: * net/tramp-sh.el (tramp-do-copy-or-rena


From: Michael Albinus
Subject: [Emacs-diffs] emacs-24 r116858: * net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the
Date: Tue, 25 Mar 2014 09:49:46 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116858
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-03-25 10:49:37 +0100
message:
  * net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the
  `rename' case, check whether source directory has set the sticky bit.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-25 08:16:49 +0000
+++ b/lisp/ChangeLog    2014-03-25 09:49:37 +0000
@@ -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  <address@hidden>
 

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-03-25 08:16:49 +0000
+++ b/lisp/net/tramp-sh.el      2014-03-25 09:49:37 +0000
@@ -2110,6 +2110,12 @@
           ;; 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))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]