From: Michael Vogt Date: Wed, 2 Jun 2010 21:15:55 +0000 (+0200) Subject: methods/mirror.cc: simplify uri.startswith() X-Git-Tag: 0.8.0~9^2~41^2~2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/b86f642111954754dd9932ed2f28a9ea85035e87 methods/mirror.cc: simplify uri.startswith() --- diff --git a/methods/mirror.cc b/methods/mirror.cc index 567522478..cfc155f58 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -106,7 +106,7 @@ bool MirrorMethod::Clean(string Dir) for(I=list.begin(); I != list.end(); I++) { string uri = (*I)->GetURI(); - if(uri.substr(0,strlen("mirror://")) != string("mirror://")) + if(uri.find("mirror://") != 0) continue; string BaseUri = uri.substr(0,uri.size()-1); if (URItoFileName(BaseUri) == Dir->d_name)