PATCH: Bug 73440: Konq deletes files when dragging
David Faure
faure at kde.org
Mon Mar 8 08:24:49 GMT 2004
On Tuesday 09 March 2004 14:54, Andras Mantia wrote:
> On Sunday 07 March 2004 23:52, David Faure wrote:
> > I think there is some confusion here.
> > Overwriting a file by dropping another file on top of it in Konqueror,
> > and writing to a file from within an application, are two very different
> > things.
>
> Why should be different? Both can be triggered by the user, and I don't see
> the difference between overwriting a file (symlink) in Konqueror or saving a
> document to an existing file (symlink) in a text editor.
Because dropping icon A over icon B usually replaces icon B with icon A
once you choose overwrite. The fact that icon B is a symlink shouldn't change
this principle IMHO - but I also agree with the "ask the user" solution, if
some people really need the feature to update the file behind the symlink's
target (it would be good to have some input from people actually doing this;
I use symlinks to both files and dirs, but I never drop something onto a
symlink to a file...).
> > While I believe the first one should not follow symlinks (see the initial
> > part of the thread),
>
> I read again, but I still think that this way Konqui/KDE behaves inconsistent
> compared to the rest of the *nix world. I have shown that shell commands or
> mc (and maybe other old file managers as well) overwrite the destination
> file. If we want to be really smart, we should make a distinction between
> overwriting a file or symlink and offer the choice to the user to overwrite
> the original file, the symlink file and so.
Yes.
> > the second one should obviously follow symlinks!!
> > If it doesn't do that anymore, then it's a regression introduced by the fix
> > for the first case. This means Dawit's fix needs work....
>
> I can't verify the previous behavior, but it seems that the current one is
> broken. Although KWrite does it right...
KateBuffer::saveFile uses QFile and KParts::ReadWritePart::saveToURL
does nothing else in case of a local file (and uses KIO::file_move for
remote files, but that should be fine too).
This really makes me wonder, why apps would use KIO::copy/move
(in particular for a single file)... What is kompare doing exactly?
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list