From f936a8794bb99239418c5f422808d560560b0a7e Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 24 Mar 2025 07:34:13 +0100 Subject: 🛠️ Fixed: Wrong path build after file sanitization on Windows. Fixes #389 & #358 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/helper/path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index da0e410..700cb68 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -205,9 +205,9 @@ def get_format_template( def path_file_sanitize(path_file: pathlib.Path, adapt: bool = False, uniquify: bool = True) -> pathlib.Path: - sanitized_path_file: pathlib.Path = pathlib.Path(path_file.root) # Get each directory name separately (first value in tuple; second value is for the file suffix). to_sanitize: [[str, str]] = path_split_parts_suffix(path_file) + sanitized_path_file: pathlib.Path = pathlib.Path(to_sanitize.pop(0)[0]) for name, suffix in to_sanitize: # Sanitize names: We need first top make sure that none file / directory name has bad chars or is longer than 255 chars. -- cgit v1.3.1