summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 035cc61b..b92b2675 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -985,11 +985,13 @@ class XmlManifest(object):
985 # Assume paths might be used on case-insensitive filesystems. 985 # Assume paths might be used on case-insensitive filesystems.
986 path = path.lower() 986 path = path.lower()
987 987
988 # We don't really need to reject '.' here, but there shouldn't really be a 988 # Some people use src="." to create stable links to projects. Lets allow
989 # need to ever use it, so no need to accept it either. 989 # that but reject all other uses of "." to keep things simple.
990 for part in set(path.split(os.path.sep)): 990 parts = path.split(os.path.sep)
991 if part in {'.', '..', '.git'} or part.startswith('.repo'): 991 if parts != ['.']:
992 return 'bad component: %s' % (part,) 992 for part in set(parts):
993 if part in {'.', '..', '.git'} or part.startswith('.repo'):
994 return 'bad component: %s' % (part,)
993 995
994 if not symlink and path.endswith(os.path.sep): 996 if not symlink and path.endswith(os.path.sep):
995 return 'dirs not allowed' 997 return 'dirs not allowed'