diff --git a/rarpar.py b/rarpar.py index 189b0c9..ced194a 100644 --- a/rarpar.py +++ b/rarpar.py @@ -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: