summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifest_xml.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index b6aef510..f546045a 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -978,6 +978,10 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
978 return project 978 return project
979 979
980 def GetProjectPaths(self, name, path): 980 def GetProjectPaths(self, name, path):
981 # The manifest entries might have trailing slashes. Normalize them to avoid
982 # unexpected filesystem behavior since we do string concatenation below.
983 path = path.rstrip('/')
984 name = name.rstrip('/')
981 use_git_worktrees = False 985 use_git_worktrees = False
982 relpath = path 986 relpath = path
983 if self.IsMirror: 987 if self.IsMirror:
@@ -1010,6 +1014,10 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
1010 return os.path.relpath(relpath, parent_relpath) 1014 return os.path.relpath(relpath, parent_relpath)
1011 1015
1012 def GetSubprojectPaths(self, parent, name, path): 1016 def GetSubprojectPaths(self, parent, name, path):
1017 # The manifest entries might have trailing slashes. Normalize them to avoid
1018 # unexpected filesystem behavior since we do string concatenation below.
1019 path = path.rstrip('/')
1020 name = name.rstrip('/')
1013 relpath = self._JoinRelpath(parent.relpath, path) 1021 relpath = self._JoinRelpath(parent.relpath, path)
1014 gitdir = os.path.join(parent.gitdir, 'subprojects', '%s.git' % path) 1022 gitdir = os.path.join(parent.gitdir, 'subprojects', '%s.git' % path)
1015 objdir = os.path.join(parent.gitdir, 'subproject-objects', '%s.git' % name) 1023 objdir = os.path.join(parent.gitdir, 'subproject-objects', '%s.git' % name)