From fadfb70021908b49cb8cf1cd2100dc5792c8e2d9 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Mon, 30 Dec 2024 18:44:58 +0100 Subject: [PATCH] Make cache check Windows only --- src/tauon/t_modules/t_main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tauon/t_modules/t_main.py b/src/tauon/t_modules/t_main.py index 024779343..bfeb451c8 100644 --- a/src/tauon/t_modules/t_main.py +++ b/src/tauon/t_modules/t_main.py @@ -48333,9 +48333,10 @@ def drop_file(target): cache_dir = tmp_cache_dir() if os.path.isdir(cache_dir): # This check can be Windows only, lazy deletes are fine on Linux/macOS - while cachement.running: - logging.warning("Waiting for caching to stop before deleting cache directory…") - time.sleep(0.2) + if sys.platform == "win32": + while tauon.cachement.running: + logging.warning("Waiting for caching to stop before deleting cache directory…") + time.sleep(0.2) logging.info("Clearing tmp cache") shutil.rmtree(cache_dir)