diff options
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r-- | lisp/tar-mode.el | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 97d883eebd9..73978ffc4a7 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -480,23 +480,9 @@ checksum before doing the check." (defun tar-grind-file-mode (mode) "Construct a `rw-r--r--' string indicating MODE. -MODE should be an integer which is a file mode value." - (string - (if (zerop (logand 256 mode)) ?- ?r) - (if (zerop (logand 128 mode)) ?- ?w) - (if (zerop (logand 2048 mode)) - (if (zerop (logand 64 mode)) ?- ?x) - (if (zerop (logand 64 mode)) ?S ?s)) - (if (zerop (logand 32 mode)) ?- ?r) - (if (zerop (logand 16 mode)) ?- ?w) - (if (zerop (logand 1024 mode)) - (if (zerop (logand 8 mode)) ?- ?x) - (if (zerop (logand 8 mode)) ?S ?s)) - (if (zerop (logand 4 mode)) ?- ?r) - (if (zerop (logand 2 mode)) ?- ?w) - (if (zerop (logand 512 mode)) - (if (zerop (logand 1 mode)) ?- ?x) - (if (zerop (logand 1 mode)) ?T ?t)))) +MODE should be an integer which is a file mode value. +For instance, if mode is #o700, then it produces `rwx------'." + (substring (file-modes-number-to-symbolic mode) 1)) (defun tar-header-block-summarize (tar-hblock &optional mod-p) "Return a line similar to the output of `tar -vtf'." @@ -1056,7 +1042,7 @@ extracted file." (write-region start end to-file nil nil nil t)) (when (and tar-copy-preserve-time date) - (set-file-times to-file date))) + (set-file-times to-file date 'nofollow))) (message "Copied tar entry %s to %s" name to-file))) (defun tar-new-entry (filename &optional index) |