summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tidal_dl_ng/helper/path.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py
index db0a17c..29347cb 100644
--- a/tidal_dl_ng/helper/path.py
+++ b/tidal_dl_ng/helper/path.py
@@ -278,12 +278,13 @@ def path_file_sanitize(path_file: pathlib.Path, adapt: bool = False, uniquify: b
sanitized_parts = []
for part in sanitized_path.parts:
- if part in sanitized_path.root:
+ if part in sanitized_path.anchor:
sanitized_parts.append(part)
else:
sanitized_parts.append(
sanitize_filename(part, replacement_text="_", validate_after_sanitize=True, platform="auto")
)
+
sanitized_path = pathlib.Path(*sanitized_parts)
# Then sanitize the whole path itself. The whole path is not allowed to be longer than 'PC_NAME_MAX'.