Bug 110932

Summary: changing folder name over the media protocol locks the folder
Product: [Unmaintained] kio Reporter: tropikhajma <tropikhajma>
Component: mediaAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description tropikhajma 2005-08-16 23:48:24 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Mandriva RPMs
OS:                Linux

To reproduce:
start konqueror
enter media:/ into the location bar
navigate to location where you have enough permissions to rename folders - e.g. to your ~/
rename a folder
now the renamed folder turns to locked folder - it has a picture of a lock in the icon and when I try to enter it, it opens in new window (instead of the default)
It gets fixed when I refresh the view.
Comment 1 Kevin Ottens 2005-09-23 23:02:45 UTC
Can reproduce this one, even in the 3.5 branch.
Comment 2 Kevin Ottens 2005-09-26 23:21:26 UTC
SVN commit 464310 by ervin:

We have to plan a refresh of an item if it uses UDS_LOCAL_PATH.
Thanks to dfaure for the patch.

CCBUG:110932


 M  +9 -4      kdirlister.cpp  


--- branches/KDE/3.5/kdelibs/kio/kio/kdirlister.cpp #464309:464310
@@ -755,10 +755,15 @@
   KFileItem *fileitem = findByURL( 0, oldurl );
   if ( fileitem )
   {
-    aboutToRefreshItem( fileitem );
-    fileitem->setURL( dst );
-    fileitem->refreshMimeType();
-    emitRefreshItem( fileitem );
+    if ( !fileitem->isLocalFile() && !fileitem->localPath().isEmpty() ) // it uses UDS_LOCAL_PATH? ouch, needs an update then
+        FilesChanged( src );
+    else
+    {
+        aboutToRefreshItem( fileitem );
+        fileitem->setURL( dst );
+        fileitem->refreshMimeType();
+        emitRefreshItem( fileitem );
+    }
   }
 #ifdef DEBUG_CACHE
   printDebug();
Comment 3 Kevin Ottens 2005-09-26 23:23:42 UTC
SVN commit 464311 by ervin:

We have to plan a refresh of an item if it uses UDS_LOCAL_PATH.
Thanks to dfaure for the patch.
(forward port)

BUG:110932



 M  +9 -4      kdirlister.cpp  


--- trunk/KDE/kdelibs/kio/kio/kdirlister.cpp #464310:464311
@@ -761,10 +761,15 @@
   KFileItem *fileitem = findByURL( 0, oldurl );
   if ( fileitem )
   {
-    aboutToRefreshItem( fileitem );
-    fileitem->setURL( dst );
-    fileitem->refreshMimeType();
-    emitRefreshItem( fileitem );
+    if ( !fileitem->isLocalFile() && !fileitem->localPath().isEmpty() ) // it uses UDS_LOCAL_PATH? ouch, needs an update then
+        FilesChanged( src );
+    else
+    {
+        aboutToRefreshItem( fileitem );
+        fileitem->setURL( dst );
+        fileitem->refreshMimeType();
+        emitRefreshItem( fileitem );
+    }
   }
 #ifdef DEBUG_CACHE
   printDebug();