Remove multi-underscores from allowed names
This commit is contained in:
parent
2c2f97cb56
commit
349485d43b
2 changed files with 31 additions and 1 deletions
|
|
@ -353,6 +353,9 @@ class ScanDirectoryManager:
|
|||
For more explanation on the scan naming see `new_scan_dir`
|
||||
"""
|
||||
scan_name = make_name_safe(scan_name)
|
||||
|
||||
# Strip all trailing underscores from the base name
|
||||
scan_name = scan_name.strip("_")
|
||||
# A regex with the scan name and a group for the numbers
|
||||
scan_regex = re.compile(
|
||||
"^" + scan_name + "_([0-9]{" + str(SCAN_ZERO_PAD_DIGITS) + "})$"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue