Skip to content

Commit

Permalink
Merge pull request #8 from DigitalSlideArchive/harden-diskcache
Browse files Browse the repository at this point in the history
Harden diskcache in the mount command.
manthey authored Feb 15, 2024
2 parents 2a4bf92 + f09c66a commit 261a472
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions girder_client_mount/girder_client_mount.py
Original file line number Diff line number Diff line change
@@ -362,6 +362,7 @@ def read(self, path, size, offset, fh):
self.diskcache['cache'][key] = data
except Exception:
logger.exception('diskcache threw an exception in set')
if isinstance(data, bytes):
result += data[max(0, offset - idxoffset):
min(len(data), offset + size - idxoffset)]
else:

0 comments on commit 261a472

Please sign in to comment.