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')
|
date = time.strftime('%Y-%m-%d')
|
||||||
timestamp = time.strftime('%Y-%m-%d_%H-%M-%S')
|
timestamp = time.strftime('%Y-%m-%d_%H-%M-%S')
|
||||||
|
|
||||||
|
if basename is not None:
|
||||||
basename = re.sub(r'\.rar$', '', basename)
|
basename = re.sub(r'\.rar$', '', basename)
|
||||||
|
|
||||||
if not basename:
|
if not basename:
|
||||||
basename = f'{path.basename} ({timestamp})'
|
basename = f'{path.basename} ({timestamp})'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue