Merge pull request #53 from CodeName393/main

Merging after code review - fixes binary path handling
This commit is contained in:
Sp5rky
2026-01-22 13:53:23 -07:00
committed by GitHub
25 changed files with 1029 additions and 142 deletions

View File

@@ -121,9 +121,14 @@ def sanitize_filename(filename: str, spacer: str = ".") -> str:
The spacer is safer to be a '.' for older DDL and p2p sharing spaces.
This includes web-served content via direct links and such.
Set `unicode_filenames: true` in config to preserve native language
characters (Korean, Japanese, Chinese, etc.) instead of transliterating
them to ASCII equivalents.
"""
# replace all non-ASCII characters with ASCII equivalents
filename = unidecode(filename)
# optionally replace non-ASCII characters with ASCII equivalents
if not config.unicode_filenames:
filename = unidecode(filename)
# remove or replace further characters as needed
filename = "".join(c for c in filename if unicodedata.category(c) != "Mn") # hidden characters