From ef868d83bfb22dbfaaaa80a36dfba949d3dcfda3 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Wed, 17 Nov 2021 21:28:47 -0300 Subject: [PATCH] Fix default behavior of join --- setup.cfg | 2 +- src/fsub/fsub.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index c0233f4..16c1099 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = fsub -version = 1.0.0 +version = 1.0.1 author = Augusto Lenz Gunsch author_email = augustogunsch@tutanota.com description = CLI SubRip editor diff --git a/src/fsub/fsub.py b/src/fsub/fsub.py index 3439021..d09dc0b 100755 --- a/src/fsub/fsub.py +++ b/src/fsub/fsub.py @@ -498,7 +498,8 @@ def run(args): try: file = parsed_files.pop(0) first += file - file.delete() + if args.replace: + file.delete() except IndexError: break parsed_files.append(first)