diff --git a/command.py b/command.py index bc2f9501..2ff0a344 100644 --- a/command.py +++ b/command.py @@ -119,6 +119,11 @@ class Command(object): except KeyError: oldpath = path path = os.path.dirname(path) + if not project and path == manifest.topdir: + try: + project = self._by_path[path] + except KeyError: + pass else: try: project = self._by_path[path] diff --git a/project.py b/project.py index e0bd9c10..4a601f87 100644 --- a/project.py +++ b/project.py @@ -626,7 +626,7 @@ class Project(object): self.gitdir = gitdir.replace('\\', '/') self.objdir = objdir.replace('\\', '/') if worktree: - self.worktree = worktree.replace('\\', '/') + self.worktree = os.path.normpath(worktree.replace('\\', '/')) else: self.worktree = None self.relpath = relpath