mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-09-26 18:42:14 +08:00
Make path references OS independent
Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130
This commit is contained in:
6
repo
6
repo
@@ -432,10 +432,14 @@ def _FindRepo():
|
||||
dir = os.getcwd()
|
||||
repo = None
|
||||
|
||||
while dir != '/' and not repo:
|
||||
olddir = None
|
||||
while dir != '/' \
|
||||
and dir != olddir \
|
||||
and not repo:
|
||||
repo = os.path.join(dir, repodir, REPO_MAIN)
|
||||
if not os.path.isfile(repo):
|
||||
repo = None
|
||||
olddir = dir
|
||||
dir = os.path.dirname(dir)
|
||||
return (repo, os.path.join(dir, repodir))
|
||||
|
||||
|
Reference in New Issue
Block a user