aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-15 13:02:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-15 15:19:17 +0200
commitfe6182a8c89675f92e72c881d707e21cdf56f376 (patch)
tree6143240f92f8d12e87cb6f558aa08a15d451552e
parent423d101ca8ef75a7fbb238b902b8e1799ef50b9b (diff)
Ignore root paths that start with '.'
-rw-r--r--brep/mod-repository-root.cxx11
-rw-r--r--loader/loader.cxx4
2 files changed, 11 insertions, 4 deletions
diff --git a/brep/mod-repository-root.cxx b/brep/mod-repository-root.cxx
index 7a49e89..d3bc8f5 100644
--- a/brep/mod-repository-root.cxx
+++ b/brep/mod-repository-root.cxx
@@ -169,9 +169,16 @@ namespace brep
const string& n (*i++); // Package name.
// Check if this is a package name and not a brep static content files
- // (CSS) directory name or a repository directory name.
+ // (CSS) directory name, a repository directory name, or a special file
+ // name (the one starting with '.').
//
- if (n != "@" && n.find_first_not_of ("0123456789") != string::npos)
+ // @@ Shouldn't we validate that the package name is not "@", is not
+ // digit-only, does not start with '.' while parsing and serializing
+ // the package manifest ? Probably also need to mention these
+ // contraints in the manifest.txt file.
+ //
+ if (n != "@" && n.find_first_not_of ("0123456789") != string::npos &&
+ n[0] != '.')
{
if (i == lpath.end ())
{
diff --git a/loader/loader.cxx b/loader/loader.cxx
index 591660c..b1b7706 100644
--- a/loader/loader.cxx
+++ b/loader/loader.cxx
@@ -413,10 +413,10 @@ load_repositories (const shared_ptr<repository>& rp, database& db)
{
assert (rp->location.remote () && !rp->url);
- rp->url = rm.effective_url (rp->location);
-
// Update the base repository with manifest values.
//
+ rp->url = rm.effective_url (rp->location);
+
// @@ Should we throw if url is not available for external repository ?
// Can, basically, repository be available on the web but have no web
// interface associated ?