aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-18 06:39:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-18 06:39:28 +0000
commitbf2f85f23955583170ad11b01dd80ce72fac6858 (patch)
tree9c4a786cdb5470cd7463b3693ce7917ff8d1de91
parenta6a9e5928371523e784171ca8a025514df1c6509 (diff)
downloadpaludis-bf2f85f23955583170ad11b01dd80ce72fac6858.tar.gz
paludis-bf2f85f23955583170ad11b01dd80ce72fac6858.tar.xz
Improve src_uri checks
-rw-r--r--paludis/qa/src_uri_check.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/paludis/qa/src_uri_check.cc b/paludis/qa/src_uri_check.cc
index bd0e67d..0e6bb90 100644
--- a/paludis/qa/src_uri_check.cc
+++ b/paludis/qa/src_uri_check.cc
@@ -45,14 +45,15 @@ namespace
return;
std::string::size_type p(std::string::npos);
- if ((! fetch_restrict) && std::string::npos == ((p = a->text().find("://"))))
+ if (std::string::npos == ((p = a->text().find("://"))) && ! fetch_restrict)
result << Message(qal_major, "No protocol found for '" + a->text() +
"' and not fetch restricted");
- else if (("http" != a->text().substr(0, p)) &&
- ("https" != a->text().substr(0, p)) &&
- ("mirror" != a->text().substr(0, p)) &&
- ("ftp" != a->text().substr(0, p)))
+ else if ((std::string::npos != p) &&
+ (("http" != a->text().substr(0, p)) &&
+ ("https" != a->text().substr(0, p)) &&
+ ("mirror" != a->text().substr(0, p)) &&
+ ("ftp" != a->text().substr(0, p))))
result << Message(qal_major, "Unrecognised protocol for '" + a->text() + "'");
else if ((std::string::npos != a->text().find("dev.gentoo.org")) ||