From b86f642111954754dd9932ed2f28a9ea85035e87 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Jun 2010 23:15:55 +0200 Subject: methods/mirror.cc: simplify uri.startswith() --- methods/mirror.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3