Skip to content

Commit 1924bb4

Browse files
fix bug in recursive purging of the cache folder
1 parent 9ea5d03 commit 1924bb4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datajoint/connection.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from getpass import getpass
1010
import re
1111
import pathlib
12+
import shutil
1213

1314
from .settings import config
1415
from . import errors
@@ -258,9 +259,7 @@ def purge_query_cache(self):
258259
and isinstance(config["query_cache"], str)
259260
and pathlib.Path(config["query_cache"]).is_dir()
260261
):
261-
path_iter = pathlib.Path(config["query_cache"]).glob("**/*")
262-
for path in path_iter:
263-
path.unlink()
262+
shutil.rmtree()
264263

265264
def close(self):
266265
self._conn.close()

0 commit comments

Comments
 (0)