Version: (using KDE KDE 3.4.1) Installed from: SuSE RPMs OS: Linux I just removed a symlink on a directory on my webspace. Konqueror did not notice it was a symlink and removed it recursively like a real directory. So the data that was in the target directory is now deleted. Good luck I’d call this, I was about to remove some other symlinks, deleting them would probably have deleted the whole content of my webspace. So Konqueror should first check if the ftp directory I’m trying to remove was a symlink and then only remove that.
Data loss -> raising severity.
Ouch, sorry for the data loss. This shouldn't happen, obviously. Can you tell me which konqueror view mode you were using? Icon view, detailed list view, or tree view? The protocol used was FTP, right?
Yep, the protocol was FTP, the view mode was icon view.
Can confirm with 3.5.5 Looking into kioslave/ftp/ftp.cc I find some comments on this, e.g.: // Links on ftp sites are often links to dirs, and we have no way to check // that. Let's do like Netscape : assume dirs generally. // But we do this only when the mimetype can't be known from the filename. // --> we do better than Netscape :-) I have no idea but maybe this is the reason for this "bug" and maybe it can not be done better ? Hope David Faure can comment on this.
SVN commit 871146 by dfaure: Fix grave kio bug with FTP: if you delete a symlink to a folder, it would recursively delete the folder (!) Sounds stupid, but it's FTP which is stupid; the only way to know if something is a link is by listing its parent dir, but this isn't always possible (if no permission to list the parent dir)... -> the URL isn't enough info, we need the KFileItem from the listing. Rather than adding KIO::del(KFileItemList) (and porting a lot of code), I simply grab the KFileItem from KDirListerCache, as discussed with Michael Brade in 2006 for other reasons. As a side effect, this speeds up deletion (again!) in the case of remote protocols (saves a KIO::stat per toplevel item to delete). BUG: 109181 M +13 -0 deletejob.cpp M +15 -2 kdirlister.cpp M +13 -1 kdirlister.h WebSVN link: http://websvn.kde.org/?view=rev&revision=871146