Bug 122455

Summary: Files that start with # are shown as folders
Product: [Frameworks and Libraries] kio Reporter: Sebastian Wiedenroth <wiedi>
Component: fishAssignee: Jörg Walter <trouble>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: FreeBSD Ports   
OS: FreeBSD   
Latest Commit: Version Fixed In:

Description Sebastian Wiedenroth 2006-02-22 01:15:42 UTC
Version:           1.1.2 (using KDE KDE 3.5.1)
Installed from:    FreeBSD Ports
OS:                FreeBSD

If a filename starts with a '#' character the file is shown as a folder.
Note that after renaming the file it is shown correct, but after a refresh it "is" a folder again.
This does not happen with sftp, file or other kio slaves.
I can reproduce this with an older kde version (3.4.2) and on a slackware 10.2 box.

The version kinfocenter is showing has to be wrong. I'll check that and open another bug report if i'm sure ;)
On the Slackware box kinfocenter says fish has version 1.1.1 (2002-06-23) which seems too old. 
The FreeBSD version shows 1.1.2 (2005-02-29) but according to the changelog using su for localhost has been implemented in 1.2.1. That way i tested that my version is not 1.1.2 but at least 1.2.1.

If you need more details or can give me a hint on the "wrong version thing" please contact me.
Comment 1 Nicolas Goutte 2006-02-22 10:40:38 UTC
See also bug #106648
Comment 2 Thiago Macieira 2006-02-25 21:18:54 UTC

*** This bug has been marked as a duplicate of 106648 ***
Comment 3 Andreas Kling 2006-08-06 15:16:10 UTC
Not the same bug as 106648, I'm afraid.
Comment 4 Martin Koller 2006-11-05 00:20:03 UTC
SVN commit 601999 by mkoller:

BUG: 122455

use KURL::setFileName() to properly encode special chars in filename


 M  +3 -1      fish.cpp  


--- branches/KDE/3.5/kdebase/kioslave/fish/fish.cpp #601998:601999
@@ -960,7 +960,9 @@
                     // By default, the mimetype comes from the extension
                     // We'll use the file(1) result only as fallback [like the rest of KDE does]
                     {
-                      KMimeType::Ptr mime = KMimeType::findByURL( KURL("fish://host/" + thisFn) );
+                      KURL kurl("fish://host/");
+                      kurl.setFileName(thisFn);  // properly encode special chars
+                      KMimeType::Ptr mime = KMimeType::findByURL(kurl);
                       if ( mime->name() != KMimeType::defaultMimeType() )
                           mimeAtom.m_str = mime->name();
                     }