Fix handling of basename=None.
This commit is contained in:
parent
f245ca5eae
commit
7efdcdcdbe
1 changed files with 3 additions and 1 deletions
|
@ -376,7 +376,9 @@ def rarpar(
|
|||
date = time.strftime('%Y-%m-%d')
|
||||
timestamp = time.strftime('%Y-%m-%d_%H-%M-%S')
|
||||
|
||||
basename = re.sub(r'\.rar$', '', basename)
|
||||
if basename is not None:
|
||||
basename = re.sub(r'\.rar$', '', basename)
|
||||
|
||||
if not basename:
|
||||
basename = f'{path.basename} ({timestamp})'
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue