mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Address review comments by @danielquinn
This commit is contained in:
parent
f0320fb72d
commit
3b88d6722a
2 changed files with 6 additions and 6 deletions
|
|
@ -484,11 +484,15 @@ class FileInfo:
|
|||
"""
|
||||
|
||||
filename = os.path.basename(path)
|
||||
|
||||
# Mutate filename in-place before parsing its components
|
||||
# by applying at most one of the configured transformations.
|
||||
for (pattern, repl) in settings.FILENAME_PARSE_TRANSFORMS:
|
||||
(filename, count) = pattern.subn(repl, filename)
|
||||
if count:
|
||||
break
|
||||
|
||||
# Parse filename components.
|
||||
for regex in cls.REGEXES.values():
|
||||
m = regex.match(filename)
|
||||
if m:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue