summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-05-06 23:37:19 +0200
committerhut <hut@lepus.uberspace.de>2016-05-06 23:37:19 +0200
commit3c88eefbc81c8fe906c4b7c97243edae0bcaf0cb (patch)
tree9d87222ef920fa928a773eaf63e8b6a40710acb9 /ranger
parent523689c114f0688e8efb3831e13e5214a2a858f3 (diff)
parent5b2f1c8c696beb2c7e2e6d779955d28a77fcec7c (diff)
downloadranger-3c88eefbc81c8fe906c4b7c97243edae0bcaf0cb.tar.gz
Merge branch 'master' of https://github.com/ajtluser/ranger
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/file.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ranger/container/file.py b/ranger/container/file.py
index a3db63a5..2c6d8315 100644
--- a/ranger/container/file.py
+++ b/ranger/container/file.py
@@ -96,3 +96,12 @@ class File(FileSystemObject):
             return self.fm.previews[self.realpath]['imagepreview']
         except KeyError:
             return False
+
+    def __eq__(self, other):
+        return isinstance(other, File) and self.path == other.path
+
+    def __neq__(self, other):
+        return not self.__eq__(other)
+
+    def __hash__(self):
+        return hash(self.path)