Make path references OS independent
Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130
diff --git a/command.py b/command.py
index 6e4e2c5..4e0253f 100644
--- a/command.py
+++ b/command.py
@@ -90,7 +90,7 @@
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 @@
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: