diff --git a/src/blosc2/dict_store.py b/src/blosc2/dict_store.py index 865c8ffdf..48c421b55 100644 --- a/src/blosc2/dict_store.py +++ b/src/blosc2/dict_store.py @@ -392,7 +392,7 @@ def to_b2z(self, overwrite=False, filename=None) -> os.PathLike[Any] | str: filepaths.append(filepath) # Sort filepaths by file size from largest to smallest - filepaths.sort(key=lambda f: os.path.getsize(f), reverse=True) + filepaths.sort(key=os.path.getsize, reverse=True) with zipfile.ZipFile(self.b2z_path, "w", zipfile.ZIP_STORED) as zf: # Write all files (except estore_path) first (sorted by size)