all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 5343@debbugs.gnu.org
Subject: bug#5343: 23.1.91; recursive directory copying is broken
Date: Tue, 12 Jan 2010 23:07:31 +0100	[thread overview]
Message-ID: <87fx6bgeos.fsf@gmx.de> (raw)
In-Reply-To: <878wc754i1.fsf@escher.home> (Stephen Berman's message of "Sat, 09 Jan 2010 22:53:58 +0100")

Stephen Berman <stephen.berman@gmx.net> writes:

>> 1. emacs -Q
>> 2. Make a directory /tmp/test, add to it a file named "a" and a
>>    directory named "test", and add to /tmp/test/test a file named "b".
>> 3. Type `M-x copy-directory RET /tmp/test RET ~ RET' to copy /tmp/test
>>    recursively to ~.
>> 4. Type `C-x d' and at the prompt `~' to visit ~ in Dired, put the
>>    cursor on the directory "test" and type `i' to open "test" as a
>>    subdirectory.  This is the result:
>>
>>   /home/steve/test:
>>   total used in directory 16 available 7794948
>>   -rw-r--r--  1 steve users    4 2010-01-08 23:57 a
>>   -rw-r--r--  1 steve users    7 2010-01-08 23:57 b

Should be fixed now. However, the patch is a little bit different from
yours.

> This is due to the following code in copy-directory:
>
>     (if (and (file-directory-p newname)
>              (not (string-equal (file-name-nondirectory directory)
>     				(file-name-nondirectory newname))))
> 	(setq newname
> 	      (expand-file-name (file-name-nondirectory directory) newname)))
>
> Specifically, the equality check prevents newname from being changed
> from "home/steve/test" to "home/steve/test/test".  Removing this check,
> as in the below patch, fixes the above breakage.  I don't see any real
> problem this check prevents, but maybe I'm overlooking something.

IIRC, there were some problems when copying a directory into an existing
one. Cannot remember the exact test case, because I haven't written a
comment about.

> Steve Berman

Best regards, Michael.






  parent reply	other threads:[~2010-01-12 22:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <nqljg2tgsl.fsf@alcatel-lucent.com>
2010-01-08 23:14 ` bug#5343: 23.1.91; recursive directory copying is broken Stephen Berman
2010-01-09 21:53   ` Stephen Berman
2010-01-10  2:14     ` Lennart Borgman
2010-01-12 22:07     ` Michael Albinus [this message]
2010-01-13 10:52       ` Stephen Berman
2010-01-13 10:56   ` bug#5343: marked as done (23.1.91; recursive directory copying is broken) Emacs bug Tracking System

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=87fx6bgeos.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=5343@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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.