PATCH: Bug 73440: Konq deletes files when dragging
Dirk Mueller
mueller at kde.org
Sun Feb 15 16:21:19 GMT 2004
On Saturday 14 February 2004 23:35, David Faure wrote:
> > - Fixes BR 73440. All io-slaves that support "linking & copying" need a
> > similar fix.
> Looks good to me, thanks.
Huh?
I think this patch is wrong. You *can* write to a symlink, and it *has to*
overwrite the *destination* of the symlink.
Otherwise whenever you overwrite a file that has a symlink in its path, you're
actually "detaching" it and you have two different files afterwards. that is
wrong.
$ echo "test" > source
$ rm -f dest
$ ln -s dest symlink
$ ls -l dest symlink source
-rw-r--r-- 1 dirk users 5 2004-02-15 17:15 source
lrwxrwxrwx 1 dirk users 4 2004-02-15 17:15 symlink -> dest
$ cp source symlink
$ ls -l dest symlink source
-rw-r--r-- 1 dirk users 5 2004-02-15 17:16 dest
-rw-r--r-- 1 dirk users 5 2004-02-15 17:15 source
lrwxrwxrwx 1 dirk users 4 2004-02-15 17:15 symlink -> dest
$ cp source symlink
<no error message, same thing like before>
$ rm symlink
$ ln -s source symlink
$ cp source symlink
cp: `source' and `symlink' are the same file
The part that is broken in konqueror is the "is it the same file?" check.
Dirk
More information about the kde-core-devel
mailing list