diff options
| author | Anthony Newnam <anthony.newnam@garmin.com> | 2011-01-09 17:31:57 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2011-01-09 17:39:19 -0800 |
| commit | df14a70c4529821d7450303ec553a9f608af1656 (patch) | |
| tree | 4631409d5610fb103912687dc4f8321d9b46f3a4 /repo | |
| parent | f18cb761731a791bf1b9ee8c6308bfce5c9d3e62 (diff) | |
| download | git-repo-df14a70c4529821d7450303ec553a9f608af1656.tar.gz | |
Make path references OS independent
Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130
(cherry picked from commit b0f9a02394779c1c9422a9649412c9ac5fb0f12f)
Conflicts:
command.py
Diffstat (limited to 'repo')
| -rwxr-xr-x | repo | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -430,10 +430,14 @@ def _FindRepo(): | |||
| 430 | dir = os.getcwd() | 430 | dir = os.getcwd() |
| 431 | repo = None | 431 | repo = None |
| 432 | 432 | ||
| 433 | while dir != '/' and not repo: | 433 | olddir = None |
| 434 | while dir != '/' \ | ||
| 435 | and dir != olddir \ | ||
| 436 | and not repo: | ||
| 434 | repo = os.path.join(dir, repodir, REPO_MAIN) | 437 | repo = os.path.join(dir, repodir, REPO_MAIN) |
| 435 | if not os.path.isfile(repo): | 438 | if not os.path.isfile(repo): |
| 436 | repo = None | 439 | repo = None |
| 440 | olddir = dir | ||
| 437 | dir = os.path.dirname(dir) | 441 | dir = os.path.dirname(dir) |
| 438 | return (repo, os.path.join(dir, repodir)) | 442 | return (repo, os.path.join(dir, repodir)) |
| 439 | 443 | ||
