File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ class DictStore:
5858 and only when ``mode="r"``. Default is None.
5959 tmpdir : str or None, optional
6060 Temporary directory to use when working with ".b2z" files. If None,
61- a system temporary directory will be managed. Default is None.
61+ a temporary directory is created in the same directory as the ".b2z"
62+ file, so that unpacked data stays on the same filesystem. Default is None.
6263 cparams : dict or None, optional
6364 Compression parameters for the internal embed store.
6465 If None, the default Blosc2 parameters are used.
@@ -165,7 +166,8 @@ def _setup_paths_and_dirs(self, tmpdir: str | None):
165166 self .is_zip_store = False
166167 if self .is_zip_store :
167168 if tmpdir is None :
168- self ._temp_dir_obj = tempfile .TemporaryDirectory ()
169+ b2z_parent = os .path .dirname (os .path .abspath (self .localpath ))
170+ self ._temp_dir_obj = tempfile .TemporaryDirectory (dir = b2z_parent )
169171 self .working_dir = self ._temp_dir_obj .name
170172 else :
171173 self .working_dir = tmpdir
Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ class TreeStore(DictStore):
105105 File mode ('r', 'w', 'a'). Default is 'a'.
106106 tmpdir : str or None, optional
107107 Temporary directory to use when working with `.b2z` files. If None,
108- a system temporary directory will be managed. Default is None.
108+ a temporary directory is created in the same directory as the `.b2z`
109+ file, so that unpacked data stays on the same filesystem. Default is None.
109110 cparams : dict or None, optional
110111 Compression parameters for the internal embed store.
111112 If None, the default Blosc2 parameters are used.
You can’t perform that action at this time.
0 commit comments