fix: bl_file diff when clear memory cache is enabled

This commit is contained in:
Swann 2020-10-13 17:09:43 +02:00
parent 8861986213
commit e1d9982276
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -135,6 +135,9 @@ class BlFile(ReplicatedDatablock):
file.close()
def diff(self):
memory_size = sys.getsizeof(self.data['file'])-33
disk_size = self.instance.stat().st_size
return memory_size == disk_size
if self.preferences.clear_memory_filecache:
return False
else:
memory_size = sys.getsizeof(self.data['file'])-33
disk_size = self.instance.stat().st_size
return memory_size == disk_size