diff options
author | nfnty <git@nfnty.se> | 2015-10-04 22:12:21 +0200 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2016-02-08 04:43:03 +0100 |
commit | e7e867685eaebb0d12e9e69b74b18cb565b84f10 (patch) | |
tree | a3ac3e69fcb1eaf41b319a1523997f1cad0b5d71 | |
parent | 142db64add27d8f7fc6247fd93a1a7d72fbb64f8 (diff) | |
download | ranger-e7e867685eaebb0d12e9e69b74b18cb565b84f10.tar.gz |
VCS: Fix _path_contains
-rw-r--r-- | ranger/ext/vcs/vcs.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ranger/ext/vcs/vcs.py b/ranger/ext/vcs/vcs.py index 3f7236f5..c37bf006 100644 --- a/ranger/ext/vcs/vcs.py +++ b/ranger/ext/vcs/vcs.py @@ -84,7 +84,7 @@ class Vcs(object): def _path_contains(self, parent, path): """Checks wether path is an object belonging to the subtree in parent""" if parent == path: return True - parent = os.path.normpath(parent + '/') + parent = os.path.normpath(parent) + '/' path = os.path.normpath(path) return os.path.commonprefix([parent, path]) == parent @@ -237,7 +237,6 @@ class Vcs(object): prel, tail = os.path.split(prel) # check if prel is a directory that contains some file in status - prel = os.path.relpath(path, self.root) if os.path.isdir(path): sts = set(st for p, st in self.status.items() if self._path_contains(path, os.path.join(self.root, p))) |