From f936a8794bb99239418c5f422808d560560b0a7e Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 24 Mar 2025 07:34:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Fixed:=20Wrong=20path?= =?UTF-8?q?=20build=20after=20file=20sanitization=20on=20Windows.=20Fixes?= =?UTF-8?q?=20#389=20&=20#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.