Konqueror deletes file when copy overwrites link
Eric Clifford
j7s12c at earthlink.net
Wed May 26 19:55:09 BST 2004
I discovered this the hard way last night in KDE 3.1.4-4 Red Hat 9.0
Konqueror 3.1-12. It is reproduceable and confirmed on someone
elses box. I have no way of testing other versions right now.
Problem:
If you have 2 directorys (dir1 and dir2), file foo.txt in dir1, and a symlink
in dir2 pointing to dir1/foo.txt
Konqueror doesn't check to see if the source and destination file are
the same file when you [drag-and-drop > copy here] the file foo.txt into
dir2 and select [Overwrite] the symlink file. The result is the file foo.txt
gets overwritten with nothing (zero byte size), you loose the original file.
==============================================
[eric at biko Desktop]$ mkdir dir1 dir2
[eric at biko Desktop]$ cat > dir1/foo.txt
11111111111111111111111111111111111111
[eric at biko Desktop]$ ls -li dir1/foo.txt
32288 -rw-r--r-- 1 eric eric 39 May 26 13:14 dir1/foo
[eric at biko Desktop]$ ln -s /home/eric/Desktop/dir1/foo.txt
/home/eric/Desktop/dir2/
[eric at biko Desktop]$ ls -li dir2
total 0
32289 lrwxrwxrwx 1 eric eric 27 May 26 13:15 foo ->
/home/eric/Desktop/dir1/foo.txt
#####################################
in Konqueror, drag-and-drop file dir1/foo.txt and overwrite
dir2/foo.text (the symlink) as per above
#####################################
[eric at biko Desktop]$ ls -li dir1 dir2
dir1:
total 0
32288 -rw-r--r-- 1 eric eric 0 May 26 13:14 foo.txt
dir2:
total 0
32289 lrwxrwxrwx 1 eric eric 27 May 26 13:15 foo.txt ->
/home/eric/Desktop/dir1/foo.txt
=================================================
Eric
More information about the kfm-devel
mailing list