[Top][All Lists]
[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: |
Sun, 30 Jan 2011 11:46:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> Stefan Monnier <address@hidden> writes:
>
>> I don't think there's a traditional C-level equivalent to `cp', but at
>> least for `mv', the C-level API (aka `rename') does not behave like
>> `mv', but instead signals an error if the destination is
>> a pre-existing directory.
>>
>> As Lennart points out, the semantics of `rename' are a bit less magical,
>> which tends to work well when you care about race-conditions and other
>> fun stuff. OTOH out `copy-file' behaves like `cp', so I guess it's OK
>> for copy-directory to also always behave like `cp' even for
>> non-interactive uses.
>
> I've commited the patch to the branch. Dired seems to still work fine.
Sorry for coming in late.
A year ago, there was the related Bug#5343. I've fixed that.
Your patch breaks recursive copy now. Extend the use case from that bug
report:
- 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" "~/")
Everything is fine
- Apply again (copy-directory "/tmp/test" "~/")
The target directory structure is broken.
> I haven't checked whether the Tramp handlers need fixing, though.
When possible, Tramp will use native means for recursive copy. Try
(copy-directory "/tmp/test" "/rsync::~/")
I would like to keep this behaviour.
Best regards, Michael.
- Re: bug in copy-directory, (continued)
- Re: bug in copy-directory, Jan Djärv, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Eli Zaretskii, 2011/01/28
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/28
- Re: bug in copy-directory, Stefan Monnier, 2011/01/28
- Re: bug in copy-directory, Chong Yidong, 2011/01/29
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/29
- Re: bug in copy-directory, Michael Albinus, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Michael Albinus, 2011/01/30
- Re: bug in copy-directory,
Michael Albinus <=
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Michael Albinus, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Michael Albinus, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30
- Re: bug in copy-directory, Michael Albinus, 2011/01/30
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/30