Bug 60724

Summary: Can't assign icones to files like *README*
Product: [Applications] systemsettings Reporter: Vinzstyle <Vinzstyle>
Component: kcm_filetypesAssignee: Marie Loise Nolden <nolden>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Vinzstyle 2003-07-04 04:44:46 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Mandrake RPMs
OS:          Linux

I Can't assign an icon to files like *README*. For example, all my *.cpp files have a particular icon.

I assigned a particular icon to all files that end in *.cpp. But, if I do the same for all the files that contains README by typing *README*, it doesn't work.

*README and README* work, but not *README*.
Comment 1 Aaron J. Seigo 2003-07-06 23:21:17 UTC
Subject: kdelibs/kdecore

CVS commit by aseigo: 

allow matching patterns such as *README*

CCMAIL:60724-done@bugs.kde.org


  M +5 -0      kstringhandler.cpp   1.26


--- kdelibs/kdecore/kstringhandler.cpp  #1.25:1.26
@@ -509,4 +509,9 @@ bool KStringHandler::matchFileName( cons
    // Patterns like "Makefile*"
    if ( pattern[ pattern_len - 1 ] == '*' && len + 1 >= pattern_len ) {
+      if ( pattern[ 0 ] == '*' )
+      {
+         return filename.find(pattern.mid(1, pattern_len - 2)) != -1;
+      }
+
       const QChar *c1 = pattern.unicode();
       const QChar *c2 = filename.unicode();