summaryrefslogtreecommitdiffstats
path: root/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'command.py')
-rw-r--r--command.py6
1 files changed, 4 insertions, 2 deletions
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):
90 project = all.get(arg) 90 project = all.get(arg)
91 91
92 if not project: 92 if not project:
93 path = os.path.abspath(arg) 93 path = os.path.abspath(arg).replace('\\', '/')
94 94
95 if not by_path: 95 if not by_path:
96 by_path = dict() 96 by_path = dict()
@@ -100,13 +100,15 @@ class Command(object):
100 try: 100 try:
101 project = by_path[path] 101 project = by_path[path]
102 except KeyError: 102 except KeyError:
103 oldpath = None
103 while path \ 104 while path \
104 and path != '/' \ 105 and path != oldpath \
105 and path != self.manifest.topdir: 106 and path != self.manifest.topdir:
106 try: 107 try:
107 project = by_path[path] 108 project = by_path[path]
108 break 109 break
109 except KeyError: 110 except KeyError:
111 oldpath = path
110 path = os.path.dirname(path) 112 path = os.path.dirname(path)
111 113
112 if not project: 114 if not project: