GNU bug report logs - #61708
28.2; file-modes-symbolic-to-number inconsistency

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Wed, 22 Feb 2023 13:59:02 UTC

Severity: normal

Found in version 28.2

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thievol <at> posteo.net>
To: 61708 <at> debbugs.gnu.org
Subject: bug#61708: 28.2; file-modes-symbolic-to-number inconsistency
Date: Wed, 22 Feb 2023 14:16:53 +0000
[Message part 1 (text/plain, inline)]
Here a simple patch to summarize what's wrong:

diff --git a/lisp/files.el b/lisp/files.el
index 5b989902bc3..576eb22c49f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -8363,6 +8363,7 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 if omitted)."
   (cond ((eq char ?r) #o0444)
 	((eq char ?w) #o0222)
 	((eq char ?x) #o0111)
+        ((eq char ?-) #o0000)
 	((eq char ?s) #o6000)
 	((eq char ?t) #o1000)
 	;; Rights relative to the previous file modes.
@@ -8393,7 +8394,7 @@ as in \"og+rX-w\"."
       (let ((num-right 0)
 	    char-right)
 	(while (memq (setq char-right (pop list-rights))
-		     '(?r ?w ?x ?X ?s ?t ?u ?g ?o))
+		     '(?r ?w ?x ?X ?s ?t ?u ?g ?o ?-))
 	  (setq num-right
 		(logior num-right
 			(file-modes-char-to-right char-right num-rights))))

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.