Fix: fix filename format remove none when part of directory (#5210)

This commit is contained in:
shamoon
2024-01-02 07:17:18 -08:00
committed by GitHub
parent 77b9b79a9e
commit e6d6f21d33
2 changed files with 29 additions and 1 deletions

View File

@@ -222,7 +222,7 @@ def generate_filename(
).strip()
if settings.FILENAME_FORMAT_REMOVE_NONE:
path = path.replace("-none-/", "") # remove empty directories
path = path.replace("/-none-/", "/") # remove empty directories
path = path.replace(" -none-", "") # remove when spaced, with space
path = path.replace("-none-", "") # remove rest of the occurences