Use system temp dir to avoid OSError about too long path

This commit is contained in:
Ioann Volkov 2025-03-29 14:13:02 +02:00
parent 6fab4f148a
commit b6b193a336

View File

@ -31,6 +31,7 @@ import traceback
import threading
import shutil
import logging
import tempfile
logging.getLogger("numba").setLevel(logging.WARNING)
@ -38,7 +39,7 @@ logging.getLogger("httpx").setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
tmp = os.path.join(now_dir, "TEMP")
tmp = os.path.join(tempfile.gettempdir(), "RVC")
shutil.rmtree(tmp, ignore_errors=True)
shutil.rmtree("%s/runtime/Lib/site-packages/infer_pack" % (now_dir), ignore_errors=True)
shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True)