Bug 60724 - Can't assign icones to files like *README*
Summary: Can't assign icones to files like *README*
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_filetypes (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Marie Loise Nolden
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-04 04:44 UTC by Vinzstyle
Modified: 2003-07-06 23:21 UTC (History)
0 users

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 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();