From 4ea338c8118593f783ab701c923f810d5b976847 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:15:47 +0800 Subject: [PATCH] Update my_utils.py --- tools/my_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/my_utils.py b/tools/my_utils.py index 5d19d2e..53544f8 100644 --- a/tools/my_utils.py +++ b/tools/my_utils.py @@ -28,6 +28,5 @@ def load_audio(file, sr): def clean_path(path_str:str): if path_str.endswith(('\\','/')): return clean_path(path_str[0:-1]) - if platform.system() == 'Windows': - path_str = path_str.replace('/', '\\') - return path_str.strip(" ").strip('\'').strip("\n").strip('"').strip(" ").strip("\u202a") \ No newline at end of file + path_str = path_str.replace('/', os.sep).replace('\\', os.sep) + return path_str.strip(" ").strip('\'').strip("\n").strip('"').strip(" ").strip("\u202a")