From b0f9a02394779c1c9422a9649412c9ac5fb0f12f Mon Sep 17 00:00:00 2001 From: Anthony Newnam Date: Mon, 29 Nov 2010 13:15:24 -0600 Subject: Make path references OS independent Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130 --- command.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'command.py') diff --git a/command.py b/command.py index 6e4e2c57..4e0253fc 100644 --- a/command.py +++ b/command.py @@ -90,7 +90,7 @@ class Command(object): project = all.get(arg) if not project: - path = os.path.abspath(arg) + path = os.path.abspath(arg).replace('\\', '/') if not by_path: by_path = dict() @@ -100,13 +100,15 @@ class Command(object): try: project = by_path[path] except KeyError: + oldpath = None while path \ - and path != '/' \ + and path != oldpath \ and path != self.manifest.topdir: try: project = by_path[path] break except KeyError: + oldpath = path path = os.path.dirname(path) if not project: -- cgit v1.2.3-54-g00ecf