PATCH: Bug 52115: rename of directory misbehaves
David Faure
faure at kde.org
Mon Jan 12 08:52:30 GMT 2004
On Saturday 10 January 2004 03:16, Dawit A. wrote:
> Hello,
>
> The attached patches attempt to address BR# 52115.
Thanks but I'm afraid the patch is wrong (it duplicates code instead of fixing the bug :)
It seems that the "as method" (i.e. destination URL includes destination filename)
wasn't tested with the recursive listing case (copy+del instead of direct rename,
which happens when moving between partitions/protocols, or also after the
above case). I just applied the fix, mostly this in CopyJob::slotEntries:
// Append filename or dirname to destination URL, if allowed
- if ( destinationState == DEST_IS_DIR && !m_asMethod )
+ if ( destinationState == DEST_IS_DIR &&
+ // "copy/move as <foo>" means 'foo' is the dest for the base srcurl
+ // (passed here during stating) but not its children (during listing)
+ ( ! ( m_asMethod && state == STATE_STATING ) ) )
{
// Here we _really_ have to add some filename to the dest.
// Otherwise, we end up with e.g. dest=..../Desktop/ itself.
Thanks for bringing this to my attention.
--
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