Prevent double .rar extension if user already put it in basename.
This commit is contained in:
parent
88e127c7b1
commit
91527aa012
1 changed files with 2 additions and 0 deletions
|
@ -375,6 +375,8 @@ def rarpar(
|
|||
|
||||
date = time.strftime('%Y-%m-%d')
|
||||
timestamp = time.strftime('%Y-%m-%d_%H-%M-%S')
|
||||
|
||||
basename = re.sub(r'\.rar$', '', basename)
|
||||
if not basename:
|
||||
basename = f'{path.basename} ({timestamp})'
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue