summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 6d8fca1d..d67ba72d 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -1039,7 +1039,8 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
1039 if not path: 1039 if not path:
1040 path = name 1040 path = name
1041 else: 1041 else:
1042 msg = self._CheckLocalPath(path, dir_ok=True) 1042 # NB: The "." project is handled specially in Project.Sync_LocalHalf.
1043 msg = self._CheckLocalPath(path, dir_ok=True, cwd_dot_ok=True)
1043 if msg: 1044 if msg:
1044 raise ManifestInvalidPathError( 1045 raise ManifestInvalidPathError(
1045 '<project> invalid "path": %s: %s' % (path, msg)) 1046 '<project> invalid "path": %s: %s' % (path, msg))
@@ -1227,7 +1228,9 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
1227 # our constructed logic here. Especially since manifest authors only use 1228 # our constructed logic here. Especially since manifest authors only use
1228 # / in their paths. 1229 # / in their paths.
1229 resep = re.compile(r'[/%s]' % re.escape(os.path.sep)) 1230 resep = re.compile(r'[/%s]' % re.escape(os.path.sep))
1230 parts = resep.split(path) 1231 # Strip off trailing slashes as those only produce '' elements, and we use
1232 # parts to look for individual bad components.
1233 parts = resep.split(path.rstrip('/'))
1231 1234
1232 # Some people use src="." to create stable links to projects. Lets allow 1235 # Some people use src="." to create stable links to projects. Lets allow
1233 # that but reject all other uses of "." to keep things simple. 1236 # that but reject all other uses of "." to keep things simple.