[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-optimize
Subject:    Re: Mimetype optimization
From:       Olivier Goffart <ogoffart () bepointbe ! be>
Date:       2008-04-22 21:01:05
Message-ID: 200804222301.10009.ogoffart () bepointbe ! be
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Le mardi 22 avril 2008, Jakub Stachowski a écrit  :
> Index: kmimetypefactory.cpp
> ===================================================================
> --- kmimetypefactory.cpp        (wersja 799070)
> +++ kmimetypefactory.cpp        (kopia robocza)
> @@ -190,8 +190,10 @@
>      int len = filename.length();
>
>      // Patterns like "*~", "*.extension"
> -    if (pattern[0] == '*' && len + 1 >= pattern_len &&
> pattern.indexOf('[') == -1) +    if (pattern[0] == '*'  &&
> pattern.indexOf('[') == -1)
>      {
> +        if ( len + 1 < pattern_len ) return false;
> +

What about patern like *foo*bar*
this will not match "foobar" anymore.
I think you should search for '*' in the pattern

(oh, and is there some escaping in regexp? such as "*foo\?\?" )


["signature.asc" (application/pgp-signature)]

_______________________________________________
Kde-optimize mailing list
Kde-optimize@kde.org
https://mail.kde.org/mailman/listinfo/kde-optimize


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic