Re: Mimetype optimization
Olivier Goffart <[email protected]> Tue, 22 Apr 2008 23:01:05 +0200
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Message-ID | <[email protected]> |
--===============0985934344==
Content-Type: multipart/signed;
boundary="nextPart1484552.r12CRRRUd3";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
--nextPart1484552.r12CRRRUd3
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Le mardi 22 avril 2008, Jakub Stachowski a =C3=A9crit=C2=A0:
> Index: kmimetypefactory.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- kmimetypefactory.cpp (wersja 799070)
> +++ kmimetypefactory.cpp (kopia robocza)
> @@ -190,8 +190,10 @@
> int len =3D filename.length();
>
> // Patterns like "*~", "*.extension"
> - if (pattern[0] =3D=3D '*' && len + 1 >=3D pattern_len &&
> pattern.indexOf('[') =3D=3D -1) + if (pattern[0] =3D=3D '*' &&
> pattern.indexOf('[') =3D=3D -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\?\?" )
--nextPart1484552.r12CRRRUd3
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQBIDlIRz58lY8jWrL0RAm4NAJ99rnrTfkZauvtaSX0xQ4J5oR5zrwCgjWkL
fyBT7XEz5ZeB3xd6hL1Udc0=
=4Xe9
-----END PGP SIGNATURE-----
--nextPart1484552.r12CRRRUd3--
--===============0985934344==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Kde-optimize mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-optimize
--===============0985934344==--