diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-02 23:15:55 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-02 23:15:55 +0200 |
commit | b86f642111954754dd9932ed2f28a9ea85035e87 (patch) | |
tree | 7849837f6e1f0ee46177e36b68aed8611acb1ff9 /methods/mirror.cc | |
parent | 0391542729e5e8a2ba9ae9b1d470f252e24eb296 (diff) |
methods/mirror.cc: simplify uri.startswith()
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r-- | methods/mirror.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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) |