From: Sven Joachim <svenjoac@gmx.de>
To: rms@gnu.org
Cc: emacs-pretest-bug@gnu.org
Subject: Re: Recursive copies in Dired do not preserve directory permissions
Date: Wed, 31 Oct 2007 18:01:36 +0100 [thread overview]
Message-ID: <87sl3rcj67.fsf@gmx.de> (raw)
In-Reply-To: <E1Im8Xh-0000xO-I3@fencepost.gnu.org> (Richard Stallman's message of "Sun\, 28 Oct 2007 09\:51\:05 -0400")
Richard Stallman <rms@gnu.org> writes:
> It looks correct to me. If nobody shows a problem in 3 days,
> please install it.
Since I cannot do this myself, would someone please install it into
Emacs_22_BASE? Changelog entry and diff follow again:
2007-10-31 Sven Joachim <svenjoac@gmx.de>
* dired-aux.el (dired-copy-file-recursive): Preserve directory
permissions.
Index: dired-aux.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired-aux.el,v
retrieving revision 1.151.2.2
diff -u -r1.151.2.2 dired-aux.el
--- dired-aux.el 8 Aug 2007 07:38:48 -0000 1.151.2.2
+++ dired-aux.el 27 Oct 2007 17:59:56 -0000
@@ -1162,7 +1162,8 @@
(or (eq recursive 'always)
(yes-or-no-p (format "Recursive copies of %s? " from))))
;; This is a directory.
- (let ((files
+ (let ((mode (file-modes from))
+ (files
(condition-case err
(directory-files from nil dired-re-no-dot)
(file-error
@@ -1176,7 +1177,9 @@
(if (file-exists-p to)
(or top (dired-handle-overwrite to))
(condition-case err
- (make-directory to)
+ (progn
+ (make-directory to)
+ (set-file-modes to #o700))
(file-error
(push (dired-make-relative from)
dired-create-files-failures)
@@ -1195,7 +1198,9 @@
(file-error
(push (dired-make-relative thisfrom)
dired-create-files-failures)
- (dired-log "Copying error for %s:\n%s\n" thisfrom err))))))
+ (dired-log "Copying error for %s:\n%s\n" thisfrom err)))))
+ (if (file-directory-p to)
+ (set-file-modes to mode)))
;; Not a directory.
(or top (dired-handle-overwrite to))
(condition-case err
next prev parent reply other threads:[~2007-10-31 17:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-20 13:48 Recursive copies in Dired do not preserve directory permissions Sven Joachim
2007-10-21 7:25 ` Richard Stallman
2007-10-27 18:21 ` Sven Joachim
2007-10-28 13:51 ` Richard Stallman
2007-10-28 16:29 ` Sven Joachim
2007-10-31 17:01 ` Sven Joachim [this message]
2007-10-31 18:26 ` Juanma Barranquero
2007-10-31 20:11 ` Eli Zaretskii
2007-10-31 21:23 ` Jason Rumney
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=87sl3rcj67.fsf@gmx.de \
--to=svenjoac@gmx.de \
--cc=emacs-pretest-bug@gnu.org \
--cc=rms@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.