HCoop
/
ntk
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0391542
)
methods/mirror.cc: simplify uri.startswith()
author
Michael Vogt
<michael.vogt@ubuntu.com>
Wed, 2 Jun 2010 21:15:55 +0000
(23:15 +0200)
committer
Michael Vogt
<michael.vogt@ubuntu.com>
Wed, 2 Jun 2010 21:15:55 +0000
(23:15 +0200)
methods/mirror.cc
patch
|
blob
|
blame
|
history
diff --git
a/methods/mirror.cc
b/methods/mirror.cc
index
5675224
..
cfc155f
100644
(file)
--- 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)