mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-04-04 03:38:58 +08:00
Use system temp dir to avoid OSError about too long path
This commit is contained in:
parent
6fab4f148a
commit
b6b193a336
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user