Skip to content

Commit 7f557a6

Browse files
author
Martin Durant
committed
avoids some del-related badness
1 parent 139fa45 commit 7f557a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fsspec/implementations/cached.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _open(self, path, mode='rb', **kwargs):
5656
return f
5757

5858
def close_and_update(self, f, close):
59-
if len(f.cache.blocks) * f.blocksize >= f.size:
59+
if len(self.cache[f.path]['blocks']) * f.blocksize >= f.size:
6060
self.cache[f.path]['blocks'] = True
6161
self.save_cache()
6262
close()

0 commit comments

Comments
 (0)