Bug 123796 - it is not possible anymore to copy a file and get a notification to rename the file
Summary: it is not possible anymore to copy a file and get a notification to rename th...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 124492 124533 124915 124918 124993 125159 125198 125227 125537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-17 19:27 UTC by Janet
Modified: 2006-04-30 13:36 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janet 2006-03-17 19:27:36 UTC
Version:           3.5.1 (using KDE 3.5.1, Debian Package 4:3.5.1-4 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.14-kanotix-9

Before KDE 3.5.x it was possible to divide a konqueror window and drag a file to the other side to copy and rename it. That is not posssible anymore. Instead of getting a renaming dialog I just get a message that this would overwrite the file with itself. So I very long winded have to copy the file to another directory, rename it there and the than copy it back. I cannot even right click on the file, copy it and paste it - no renaming dialog either, just that message. This is a *very grave* usability bug.
Comment 1 Jakub Stachowski 2006-03-19 20:32:42 UTC
Strange, i definitely *can* do it (both ways) and i get rename dialog. Tested on konqueror 4:3.5.1-ubuntu12
Comment 2 Janet 2006-03-19 22:50:39 UTC
Indeed, very strange. I tested it on another computer with KDE 3.5.1-2 (also a Debian based distribution) and it worked - but only once. After that it was impossible too.
Comment 3 Janet 2006-03-21 01:09:44 UTC
I can copy folders but I cannot copy files that way: When I rightclick on a folder, choose copy, click on free space in directory, rightclick and choose paste I get the dialog to rename the pasted folder. When I do the same with a file I only get the message that source and target are the same file.
Comment 4 David Faure 2006-03-24 14:29:36 UTC
SVN commit 522108 by dfaure:

Handle ERR_IDENTICAL_FILES now that kio_file (and its wrappers :) ) emit it. Patch tested by Coolo.
BUG: 123796


 M  +15 -7     job.cpp  


--- branches/KDE/3.5/kdelibs/kio/kio/job.cpp #522107:522108
@@ -2786,7 +2786,7 @@
     {
         m_conflictError = job->error();
         if ( (m_conflictError == ERR_DIR_ALREADY_EXIST)
-             || (m_conflictError == ERR_FILE_ALREADY_EXIST) )
+             || (m_conflictError == ERR_FILE_ALREADY_EXIST) ) // can't happen?
         {
             KURL oldURL = ((SimpleJob*)job)->url();
             // Should we skip automatically ?
@@ -3050,7 +3050,8 @@
             m_conflictError = job->error(); // save for later
             // Existing dest ?
             if ( ( m_conflictError == ERR_FILE_ALREADY_EXIST )
-                 || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) )
+                 || ( m_conflictError == ERR_DIR_ALREADY_EXIST )
+                 || ( m_conflictError == ERR_IDENTICAL_FILES ) )
             {
                 subjobs.remove( job );
                 assert ( subjobs.isEmpty() );
@@ -3132,7 +3133,8 @@
         m_reportTimer->stop();
 
     if ( ( m_conflictError == ERR_FILE_ALREADY_EXIST )
-      || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) )
+         || ( m_conflictError == ERR_DIR_ALREADY_EXIST )
+         || ( m_conflictError == ERR_IDENTICAL_FILES ) )
     {
         // Its modification time:
         time_t destmtime = (time_t)-1;
@@ -3161,6 +3163,7 @@
         // Offer overwrite only if the existing thing is a file
         // If src==dest, use "overwrite-itself"
         RenameDlg_Mode mode;
+        bool isDir = true;
 
         if( m_conflictError == ERR_DIR_ALREADY_EXIST )
             mode = (RenameDlg_Mode) 0;
@@ -3172,6 +3175,7 @@
                 mode = M_OVERWRITE_ITSELF;
             else
                 mode = M_OVERWRITE;
+            isDir = false;
         }
 
 	if ( m_bSingleFileCopy )
@@ -3179,7 +3183,7 @@
 	else
             mode = (RenameDlg_Mode) ( mode | M_MULTI | M_SKIP );
 
-        res = Observer::self()->open_RenameDlg( this, m_conflictError == ERR_FILE_ALREADY_EXIST ?
+        res = Observer::self()->open_RenameDlg( this, !isDir ?
                                 i18n("File Already Exists") : i18n("Already Exists as Folder"),
                                 (*it).uSource.url(),
                                 (*it).uDest.url(),
@@ -3602,7 +3606,9 @@
         // In that case it's the _same_ dir, we don't want to copy+del (data loss!)
         if ( m_currentSrcURL.isLocalFile() && m_currentSrcURL.url(-1) != dest.url(-1) &&
              m_currentSrcURL.url(-1).lower() == dest.url(-1).lower() &&
-             ( err == ERR_FILE_ALREADY_EXIST || err == ERR_DIR_ALREADY_EXIST ) )
+             ( err == ERR_FILE_ALREADY_EXIST ||
+               err == ERR_DIR_ALREADY_EXIST ||
+               err == ERR_IDENTICAL_FILES ) )
         {
             kdDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls" << endl;
             QCString _src( QFile::encodeName(m_currentSrcURL.path()) );
@@ -3643,7 +3649,9 @@
         Q_ASSERT( m_currentSrcURL == *m_currentStatSrc );
 
         // Existing dest?
-        if ( ( err == ERR_DIR_ALREADY_EXIST || err == ERR_FILE_ALREADY_EXIST )
+        if ( ( err == ERR_DIR_ALREADY_EXIST ||
+               err == ERR_FILE_ALREADY_EXIST ||
+               err == ERR_IDENTICAL_FILES )
              && isInteractive() )
         {
             if (m_reportTimer)
@@ -3693,7 +3701,7 @@
 
                 RenameDlg_Result r = Observer::self()->open_RenameDlg(
                     this,
-                    err == ERR_FILE_ALREADY_EXIST ? i18n("File Already Exists") : i18n("Already Exists as Folder"),
+                    err != ERR_DIR_ALREADY_EXIST ? i18n("File Already Exists") : i18n("Already Exists as Folder"),
                     m_currentSrcURL.url(),
                     dest.url(),
                     mode, newPath,
Comment 5 Tommi Tervo 2006-03-29 15:02:52 UTC
*** Bug 124492 has been marked as a duplicate of this bug. ***
Comment 6 Tommi Tervo 2006-03-30 09:31:06 UTC
*** Bug 124533 has been marked as a duplicate of this bug. ***
Comment 7 D.L.C.Burggraaff 2006-03-31 17:12:58 UTC
Commit 522108 resolved the problem for me.
Thanks, Dick
Comment 8 Philip Rodrigues 2006-04-05 00:34:43 UTC
*** Bug 124915 has been marked as a duplicate of this bug. ***
Comment 9 Philip Rodrigues 2006-04-05 00:36:21 UTC
*** Bug 124918 has been marked as a duplicate of this bug. ***
Comment 10 Tommi Tervo 2006-04-06 09:27:25 UTC
*** Bug 124993 has been marked as a duplicate of this bug. ***
Comment 11 Tommi Tervo 2006-04-08 12:05:20 UTC
*** Bug 125159 has been marked as a duplicate of this bug. ***
Comment 12 Tommi Tervo 2006-04-09 10:34:36 UTC
*** Bug 125198 has been marked as a duplicate of this bug. ***
Comment 13 Haris Kouzinopoulos 2006-04-09 18:01:02 UTC
*** Bug 125227 has been marked as a duplicate of this bug. ***
Comment 14 Haris Kouzinopoulos 2006-04-14 01:35:38 UTC
*** Bug 125537 has been marked as a duplicate of this bug. ***
Comment 15 Christopher Bräuer 2006-04-15 19:57:44 UTC
I have the same problem, but how can this code from above fix it for me? What do I have to do with it?
Comment 16 Janet 2006-04-16 16:57:31 UTC
> how can this code from above fix it for me? What do I have to do

Upgrade your KDE?
Comment 17 H.H. 2006-04-30 13:32:25 UTC
I have this bug, too in
KDE Version	3.5.2 (KDE 3.5.2 Level "a" , SUSE 10.0 UNSUPPORTED)
	Application	Web Browser/File Manager
	Operating System	Linux (i686) release 2.6.13-15.8-default
	Compiler	Target: i586-suse-linux

In which KDE-Version it will be fixed? 
Comment 18 S. Burmeister 2006-04-30 13:36:34 UTC
You would have to write an email to Stephan Binner, or to the suse-kde mailinglist, to request a new build of kdelibs. If he is willing to supply it, it will be available via supplementary.