diff --git a/src/koopmans/files.py b/src/koopmans/files.py index 6f1f27260..5355d4edf 100644 --- a/src/koopmans/files.py +++ b/src/koopmans/files.py @@ -67,8 +67,8 @@ def is_dir(self): def __eq__(self, other): if not isinstance(other, FilePointer): return False - # Note that we don't check self.parent.absolute_directory - return self.absolute_directory == other.absolute_directory and self.name == other.name + # Note that we only check the parent's directory, not the parent details + return self.parent.absolute_directory == other.parent.absolute_directory and self.name == other.name def __reduce__(self): # We don't want to store the entire parent object in the database; we only need the directory information