diff options
-rwxr-xr-x | contrib/fast-import/git-p4 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 9d52eada42..551573afc5 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -909,7 +909,12 @@ class P4Sync(Command): def guessProjectName(self): for p in self.depotPaths: - return p [p.strip().rfind("/") + 1:] + if p.endswith("/"): + p = p[:-1] + p = p[p.strip().rfind("/") + 1:] + if not p.endswith("/"): + p += "/" + return p def getBranchMapping(self): for info in p4CmdList("branches"): |