emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 6f7a57c: Fix symbolic mode string conversion for


From: Andreas Schwab
Subject: [Emacs-diffs] emacs-25 6f7a57c: Fix symbolic mode string conversion for s and t
Date: Sun, 06 Mar 2016 23:32:13 +0000

branch: emacs-25
commit 6f7a57c7081ad3f8b5942a827843f8ad14e20e93
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>

    Fix symbolic mode string conversion for s and t
    
    * lisp/files.el (file-modes-char-to-right): Fix values for ?s and
    ?t.
    (file-modes-symbolic-to-number): Default to a for ts permissions.
---
 lisp/files.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 1c4dd25..5cdd384 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6795,8 +6795,8 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 
if omitted)."
   (cond ((= char ?r) #o0444)
        ((= char ?w) #o0222)
        ((= char ?x) #o0111)
-       ((= char ?s) #o1000)
-       ((= char ?t) #o6000)
+       ((= char ?s) #o6000)
+       ((= char ?t) #o1000)
        ;; Rights relative to the previous file modes.
        ((= char ?X) (if (= (logand from #o111) 0) 0 #o0111))
        ((= char ?u) (let ((uright (logand #o4700 from)))
@@ -6852,7 +6852,7 @@ as in \"og+rX-w\"."
                                  (mapcar 'file-modes-char-to-who
                                          (match-string 1 modes)))))
              (when (= num-who 0)
-               (setq num-who (default-file-modes)))
+               (setq num-who (logior #o7000 (default-file-modes))))
              (setq num-modes
                    (file-modes-rights-to-number (substring modes (match-end 1))
                                                 num-who num-modes)



reply via email to

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