From 30809f391acde52c5146bc6d9a946fcf6692ce19 Mon Sep 17 00:00:00 2001 From: Karl Voit Date: Tue, 4 Jan 2022 17:25:24 +0100 Subject: [PATCH] fixed bug when using --smart-prepend --- appendfilename/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/appendfilename/__init__.py b/appendfilename/__init__.py index ef62013..5ab375b 100755 --- a/appendfilename/__init__.py +++ b/appendfilename/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -PROG_VERSION = u"Time-stamp: <2022-01-01 11:25:53 vk>" +PROG_VERSION = u"Time-stamp: <2022-01-04 17:25:15 vk>" # TODO: # * fix parts marked with «FIXXME» @@ -317,8 +317,7 @@ def handle_file(filename, text, dryrun): new_filename = os.path.join(os.path.dirname(filename), text + separator() + old_basename + tags_with_extension) else: logging.debug('date/time-stamp found, insert text between date/time-stamp and rest') - new_filename = os.path.join(os.path.dirname(filename), match.group(1) + separator() + text + separator + match.group(len(match.groups()))) - #import pdb; pdb.set_trace() + new_filename = os.path.join(os.path.dirname(filename), match.group(1) + separator() + text + separator() + match.group(len(match.groups()))) else: new_filename = os.path.join(os.path.dirname(filename), old_basename + separator() + text + tags_with_extension) except: