From bbbfff4600af25df06c2e773f9b60cdd5b42ab87 Mon Sep 17 00:00:00 2001 From: Victor Moene Date: Mon, 29 Jun 2026 14:12:58 +0200 Subject: [PATCH] Added atomic input file deletion Ticket: CFE-3932 Signed-off-by: Victor Moene --- cfbs/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cfbs/commands.py b/cfbs/commands.py index 237f9f3e..81429111 100644 --- a/cfbs/commands.py +++ b/cfbs/commands.py @@ -530,7 +530,6 @@ def _get_modules_by_url(name) -> list: % (module_name, input_path), default="no", ): - rm(input_path) files.append(input_path) msg += "\n - Removed input data for module '%s'" % module_name log.debug("Deleted module data '%s'" % input_path) @@ -566,6 +565,8 @@ def _get_modules_by_url(name) -> list: msg = msg[4:] # Remove the '\n - ' part of the message config.save() + for input_path in files: + rm(input_path) return CFBSCommandGitResult(0, changes_made, msg, files)