[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in copy-directory
From: |
Lennart Borgman |
Subject: |
Re: bug in copy-directory |
Date: |
Fri, 28 Jan 2011 19:28:19 +0100 |
On Fri, Jan 28, 2011 at 7:11 PM, Thierry Volpiatto
<address@hidden> wrote:
> Lennart Borgman <address@hidden> writes:
>
>> On Fri, Jan 28, 2011 at 6:13 PM, Thierry Volpiatto
>> <address@hidden> wrote:
>>>>
>>>> Isn't the semantics of "cp" broken + undescribed?
>>> No
>>
>> Yes ;-)
>>
>>>> I had a directory x1, but no x2. Doing
>>>>
>>>> cp -r x1 x2
>>>>
>>>> works as I expect it to, i.e. x1 and x2 are identical.
>>>>
>>>> However after a second
>>>>
>>>> cp -r x1 x2
>>>>
>>>> there is suddenly a directory x1 inside x2.
>>> That's what is expected, imagine with what you expect, x2 is your home
>>> directory or /etc, and you copy x1 to it by error...
>>
>> So? The urge to copy?
> So x1 will overwrite your important directory and you will lost all.
> So i think cp do the right thing, since a long time as said by Andreas.
Sure it does the same thing as before and POSIX did not have much of a
mandate to change things.
But there are other semantics in use for this problem. If you look at
the semantics used by w32 "GUI shell" (Explorer) it handles the
situation that x2 exist by creating a new directory with a new name.
(Emacs uses that kind of semantic for other things.)
I would guess that such "GUI shells" on *nix have similar semantic. Or
what do they do?
- Re: bug in copy-directory, (continued)
- 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/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Andreas Schwab, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Andreas Schwab, 2011/01/28
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/28
- Re: bug in copy-directory,
Lennart Borgman <=
- 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, 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