mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-07 00:27:12 +00:00
Address review comments by @danielquinn
This commit is contained in:
1 parent
f0320fb72d
commit
3b88d6722a
2 files changed
+6
-6
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user