emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in copy-directory


From: Michael Albinus
Subject: Re: bug in copy-directory
Date: Mon, 07 Feb 2011 17:43:59 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Chong Yidong <address@hidden> writes:

> Michael Albinus <address@hidden> writes:
>
>> Now it is even worse. Going to the initial test case:
>>
>> - Create directory /tmp/test
>> - Create directory /tmp/test/test
>> - Create file /tmp/test/a
>> - Create file /tmp/test/test/b
>> - Apply (copy-directory "/tmp/test" "~/")
>>
>> You get "~/a", "~/test" and "~/test/b".
>
> I asumme that, by (copy-directory "/tmp/test" "~/"), you mean
> M-: (copy-directory "/tmp/test" "~/") RET.

Yes.

> The behavior for that is the same as on 23.2.  If you want to copy into
> a subdirectory in ~/, give it a non-nil copy-as-subdir arg.

"/tmp/test" is a directory. "~/test" does not exist yet. Therefore, I
would expect that a directory "~/test" is created, which is the copy of
"/tmp/test". Like you do in a shell:

# ll -R /tmp/test
/tmp/test:
total 12
drwxr-xr-x  3 albinus albinus 4096 2011-02-07 17:24 .
drwxrwxrwt 14 root    root    4096 2011-02-07 17:24 ..
-rw-r--r--  1 albinus albinus    0 2011-02-07 17:24 a
drwxr-xr-x  2 albinus albinus 4096 2011-02-07 17:24 test

/tmp/test/test:
total 8
drwxr-xr-x 2 albinus albinus 4096 2011-02-07 17:24 .
drwxr-xr-x 3 albinus albinus 4096 2011-02-07 17:24 ..
-rw-r--r-- 1 albinus albinus    0 2011-02-07 17:24 b

# ll -R ~/test
ls: cannot access /home/albinus/test: No such file or directory
# cp -pr /tmp/test ~/
# ll -R ~/test
/home/albinus/test:
total 12
drwxr-xr-x  3 albinus albinus 4096 2011-02-07 17:24 .
drwxr-xr-x 66 albinus albinus 4096 2011-02-07 17:31 ..
-rw-r--r--  1 albinus albinus    0 2011-02-07 17:24 a
drwxr-xr-x  2 albinus albinus 4096 2011-02-07 17:24 test

/home/albinus/test/test:
total 8
drwxr-xr-x 2 albinus albinus 4096 2011-02-07 17:24 .
drwxr-xr-x 3 albinus albinus 4096 2011-02-07 17:24 ..
-rw-r--r-- 1 albinus albinus    0 2011-02-07 17:24 b

But if I apply in Emacs 23

M-: (copy-directory "/tmp/test" "~/") RET

I get

# ll -R ~/test
/home/albinus/test:
total 8
drwxr-xr-x  2 albinus albinus 4096 2011-02-07 17:42 .
drwxr-xr-x 66 albinus albinus 4096 2011-02-07 17:42 ..
-rw-r--r--  1 albinus albinus    0 2011-02-07 17:42 b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]