[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request, mv
From: |
Joshua Hudson |
Subject: |
Re: Feature request, mv |
Date: |
Wed, 10 May 2006 08:36:16 -0700 |
On 5/10/06, Jim Meyering <address@hidden> wrote:
Thanks to Joshua for the report and to Eric for pursuing it.
There is indeed a bug.
Before the fix, mv would unnecessarily unlink the destination symlink:
$ rm -rf s[12]; ln -s / s1; ln -s /tmp s2; strace -qe unlink /bin/mv -T s1 s2
unlink("s2") = 0
With the fix, it doesn't call unlink:
$ rm -rf s[12]; ln -s / s1; ln -s /tmp s2; strace -qe unlink ./mv -T s1 s2
$
Thanks guys. The patch doesn't apply to 5.94 so I can't tell if it worked.
If you're curious this came from me trying to get mv to do
sys_rename("source", "target") when target existed and was a directory.
I'm quite certain that I am far outside of POSIX here though because I
expect the rename to succeed in this case.
Yeah, ln -d works, no privileges required.
- Feature request, mv, Joshua Hudson, 2006/05/09
- Re: Feature request, mv, Eric Blake, 2006/05/09
- Message not available
- Re: Feature request, mv, Eric Blake, 2006/05/10
- Re: Feature request, mv, Jim Meyering, 2006/05/10
- Re: Feature request, mv,
Joshua Hudson <=
- Re: Feature request, mv, Jim Meyering, 2006/05/10
- Re: Feature request, mv, Joshua Hudson, 2006/05/10
- Re: Feature request, mv, Jim Meyering, 2006/05/10
Re: Feature request, mv, Eric Blake, 2006/05/10