summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2015-10-04 22:12:21 +0200
committernfnty <git@nfnty.se>2016-02-08 04:43:03 +0100
commite7e867685eaebb0d12e9e69b74b18cb565b84f10 (patch)
treea3ac3e69fcb1eaf41b319a1523997f1cad0b5d71 /ranger
parent142db64add27d8f7fc6247fd93a1a7d72fbb64f8 (diff)
downloadranger-e7e867685eaebb0d12e9e69b74b18cb565b84f10.tar.gz
VCS: Fix _path_contains
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/vcs/vcs.py3
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)))