summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/helper/path.py
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-01-13 16:26:33 +0100
committerRobert Honz <exislow+github@gmail.com>2024-01-13 16:26:33 +0100
commitb59cba77c3769f193201b735341adc5aff05ac1a (patch)
tree2edd2f72bd0eb3745427eea5f40b841d4cbdd11f /tidal_dl_ng/helper/path.py
parentdd8833add888412ff192d9a61466c8c16c3939e2 (diff)
downloadtidal-dl-ng-b59cba77c3769f193201b735341adc5aff05ac1a.tar.gz
♻️ Refactoring of download.py ongoing.
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
-rw-r--r--tidal_dl_ng/helper/path.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py
index 5acfff4..61e17b1 100644
--- a/tidal_dl_ng/helper/path.py
+++ b/tidal_dl_ng/helper/path.py
@@ -127,7 +127,7 @@ def path_file_sanitize(path_file: str, adapt: bool = False) -> (bool, str):
# Sanitize path
try:
- pathname_sanitized = sanitize_filepath(pathname, replacement_text=" ", validate_after_sanitize=True)
+ pathname_sanitized = sanitize_filepath(pathname, replacement_text=" ", validate_after_sanitize=True, platform="auto")
except ValidationError:
# If adaption of path is allowed in case of an error set path to HOME.
if adapt:
@@ -137,7 +137,7 @@ def path_file_sanitize(path_file: str, adapt: bool = False) -> (bool, str):
# Sanitize filename
try:
- filename_sanitized = sanitize_filename(path_file, replacement_text=" ", validate_after_sanitize=True)
+ filename_sanitized = sanitize_filename(filename, replacement_text=" ", validate_after_sanitize=True, platform="auto")
filename_sanitized_extension = Path(filename_sanitized).suffix
# Check if the file extension was removed by shortening the filename length