Bug 112826 - Moving shouldn´t be copy and delete
Summary: Moving shouldn´t be copy and delete
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: media (show other bugs)
Version: 3.4.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
: 128348 130193 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-18 14:35 UTC by Michael Stather
Modified: 2006-07-12 11:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stather 2005-09-18 14:35:50 UTC
Version:           3.4.2 (using KDE 3.4.2 Level "b" , SUSE 10.0)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.13-9-default

It seems that when you move data it copies and then deletes the old files. When I move files e.g. on a USB stick it´s very slow and it even fails if there´s not much space left. IMHO it should be like on windows.
Comment 1 H.H. 2005-12-23 17:14:31 UTC
this is true for kde-3.5 on suse-10.0, too. if I use the "media:/"-protokoll, moving files from one directory to another on the usb-stick is done by copying/deleting and takes very long. If I do that action in "/media/sda1" instead, the behaviour is how it should to be.
Comment 2 Michael Stather 2005-12-24 02:43:42 UTC
Please fix this, KDE shouldn´t have such major flaws!
Comment 3 Kevin Ottens 2006-06-09 23:15:17 UTC
*** Bug 128348 has been marked as a duplicate of this bug. ***
Comment 4 patrick 2006-06-15 10:30:44 UTC
This is a serious and long standing bug. As far as I can remember the behaviour using the media:/ kioslave has always been to copy and delete instead of resolving the source and destination and doing a real move, by just renaming the path.

This is especially annoying and even irritating, as this mostly happens with external harddisks and USB memorysticks where at least people in my acquaintances store their movies or large backups on, i.e. no superfast drives combined with rather large files. Most of these people have no or little idea of using mount/umount or even care for the real paths of the files. When they then start cleaning up their external drives moving around files totalling several gigabytes in size this takes approximately forever. After telling those people to transform "media:/sda1" to "/media/sda1" the moving takes only fractions of a second.

If I could spend more than 20 points in voting for this bug, it'd get all the points I could give it. I personally consider this the most annoying misfeature in day-to-day work.

Patrick
Comment 5 Sergio Martins 2006-06-15 17:20:52 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 David Faure 2006-06-16 00:28:28 UTC
SVN commit 551895 by dfaure:

Update m_globalDest if resolving m_dest to a local path; necessary for the case of multiple source URLs.
BUG: 112826


 M  +8 -1      job.cpp  


--- branches/KDE/3.5/kdelibs/kio/kio/job.cpp #551894:551895
@@ -2304,12 +2304,15 @@
             destinationState = bDir ? DEST_IS_DIR : DEST_IS_FILE;
             //kdDebug(7007) << "CopyJob::slotResultStating dest is dir:" << bDir << endl;
         }
-        if ( m_dest == d->m_globalDest )
+        const bool isGlobalDest = m_dest == d->m_globalDest;
+        if ( isGlobalDest )
             d->m_globalDestinationState = destinationState;
 
         if ( !sLocalPath.isEmpty() && kio_resolve_local_urls ) {
             m_dest = KURL();
             m_dest.setPath(sLocalPath);
+            if ( isGlobalDest )
+                d->m_globalDest = m_dest;
         }
 
         subjobs.remove( job );
@@ -2587,6 +2590,10 @@
 
 void CopyJob::statNextSrc()
 {
+    /* Revert to the global destination, the one that applies to all source urls.
+     * Imagine you copy the items a b and c into /d, but /d/b exists so the user uses "Rename" to put it in /foo/b instead.
+     * m_dest is /foo/b for b, but we have to revert to /d for item c and following.
+     */
     m_dest = d->m_globalDest;
     destinationState = d->m_globalDestinationState;
     ++m_currentStatSrc;
Comment 7 Tommi Tervo 2006-07-03 14:07:35 UTC
*** Bug 130193 has been marked as a duplicate of this bug. ***
Comment 8 Marc Cramdal 2006-07-03 19:01:34 UTC
This should be reopened as it is not solved with KDE3.5.3 with Gentoo packages (BUG 130193)
Comment 9 Sergio Martins 2006-07-03 19:16:40 UTC
Marc, this bug was fixed after kde-3.5.3 was released. I guess 3.5.4 will be fine.
Comment 10 Lloeki 2006-07-12 11:21:38 UTC
does this also fix the copying of files when opening them from media:/ (maybe system:/ too) ?
example: I open a (often ~1Gb) video file in konq with kaffeine, the whole file gets copied, then played, as if it was remote. it's not when played 'locally'. this seems highly related.