Summary: | "delete file" undo does not work always | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Thomas Rehfinger <thomas.rehfinger> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Thomas Rehfinger
2002-11-10 19:27:25 UTC
Perfectly reproducable with KDE3.1-RC5 Subject: kdelibs/kio/kio CVS commit by faure: Patch based on a good analysis of #50527 by Pascal Letourneau: Use the correct destination URL in the copyingDone signal when moving a file, so that undoing works. CCMAIL: 50527-done@bugs.kde.org M +5 -5 job.cpp 1.341 --- kdelibs/kio/kio/job.cpp #1.340:1.341 @@ -2840,10 +2840,10 @@ void CopyJob::slotResult( Job *job ) subjobs.remove( job ); assert ( subjobs.isEmpty() ); - if ( err ) - { // Determine dest again KURL dest = m_dest; if ( destinationState == DEST_IS_DIR && !m_asMethod ) dest.addPath( m_currentSrcURL.fileName() ); + if ( err ) + { // Direct renaming didn't work. Try renaming to a temp name, // this can help e.g. when renaming 'a' to 'A' on a VFAT partition. @@ -2895,5 +2895,5 @@ void CopyJob::slotResult( Job *job ) { //kdDebug(7007) << "Renaming succeeded, move on" << endl; - emit copyingDone( this, *m_currentStatSrc, m_currentDest, true, true ); + emit copyingDone( this, *m_currentStatSrc, dest, true, true ); ++m_currentStatSrc; statNextSrc(); |