From fe6182a8c89675f92e72c881d707e21cdf56f376 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 15 Jan 2016 13:02:20 +0200 Subject: Ignore root paths that start with '.' --- brep/mod-repository-root.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'brep') 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 ()) { -- cgit v1.1