From 13d338a7897647e656cb65450d7f54ae8b4d5e61 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 12 Apr 2018 12:16:44 -0500 Subject: [PATCH] make.py - cleanup old optional pbos before rename (#6254) --- tools/make.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/make.py b/tools/make.py index 3ca0523cd0..8e4509e162 100644 --- a/tools/make.py +++ b/tools/make.py @@ -432,9 +432,15 @@ def cleanup_optionals(mod): if (os.path.isfile(src_file_path)): + if (os.path.isfile(dst_file_path)): + # print("Cleanuping up old file {}".format(dst_file_path)) + os.remove(dst_file_path); #print("Preserving {}".format(file_name)) os.renames(src_file_path,dst_file_path) if (os.path.isfile(src_sig_path)): + if (os.path.isfile(dst_sig_path)): + # print("Cleanuping up old file {}".format(dst_sig_path)) + os.remove(dst_sig_path); #print("Preserving {}".format(sigFile_name)) os.renames(src_sig_path,dst_sig_path) except FileExistsError: