all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: 28092@debbugs.gnu.org
Subject: bug#28092: 26.0.50; archive-int-to-mode check S_ISUID, S_ISGID bits in reverse order
Date: Tue, 15 Aug 2017 11:31:25 +0900	[thread overview]
Message-ID: <87tw19a7eq.fsf@calancha-pc> (raw)

Tags: patch

emacs -Q -l arc-mode

(archive-int-to-mode 2048)
=> "------S---" ; It should be: "---S------"
(archive-int-to-mode 1024)
=> "---S------" ; It should be: "------S---"

--8<-----------------------------cut here---------------start------------->8---
commit 03b830d7ad819118c8b9d4e30cf6da638a579c88
Author: Tino Calancha <tino.calancha@gmail.com>
Date:   Tue Aug 15 11:15:10 2017 +0900

    archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
    
    * lisp/arc-mode.el (archive-int-to-mode):
    Swap order of 2048 with 1024 tests (Bug#28092).
    * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
    Update test.

diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index bd7548b704..938c143b8e 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -559,13 +559,13 @@ archive-int-to-mode
     (if (zerop (logand   256 mode)) ?- ?r)
     (if (zerop (logand   128 mode)) ?- ?w)
     (if (zerop (logand    64 mode))
-	(if (zerop (logand  1024 mode)) ?- ?S)
-      (if (zerop (logand  1024 mode)) ?x ?s))
+	(if (zerop (logand  2048 mode)) ?- ?S)
+      (if (zerop (logand  2048 mode)) ?x ?s))
     (if (zerop (logand    32 mode)) ?- ?r)
     (if (zerop (logand    16 mode)) ?- ?w)
     (if (zerop (logand     8 mode))
-	(if (zerop (logand  2048 mode)) ?- ?S)
-      (if (zerop (logand  2048 mode)) ?x ?s))
+	(if (zerop (logand  1024 mode)) ?- ?S)
+      (if (zerop (logand  1024 mode)) ?x ?s))
     (if (zerop (logand     4 mode)) ?- ?r)
     (if (zerop (logand     2 mode)) ?- ?w)
     (if (zerop (logand     1 mode)) ?- ?x)))
diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el
index 04047bab62..c2501e921a 100644
--- a/test/lisp/arc-mode-tests.el
+++ b/test/lisp/arc-mode-tests.el
@@ -27,7 +27,7 @@
                      (cons 420 "-rw-r--r--")
                      (cons 292 "-r--r--r--")
                      (cons 512 "----------")
-                     (cons 1024 "---S------"))))
+                     (cons 1024 "------S---"))))
     (dolist (x alist)
       (should (equal (cdr x) (archive-int-to-mode (car x)))))))
 
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-08-15
Repository revision: e88bbd22c5ffb1d6008c0c7e18a36043b0f397dd





             reply	other threads:[~2017-08-15  2:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15  2:31 Tino Calancha [this message]
2017-08-15  6:47 ` bug#28092: 26.0.50; archive-int-to-mode check S_ISUID, S_ISGID bits in reverse order Tino Calancha
2017-08-15 16:06   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tw19a7eq.fsf@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=28092@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.