about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)