From 59dc864d19f2c3e4c45c95cfcb6b07870edfb874 Mon Sep 17 00:00:00 2001 From: shinokaro Date: Fri, 14 Jun 2024 12:01:28 +0900 Subject: [PATCH] Fix file copy logic in InnoSetupScriptBuilder#cp - Fixed a critical bug in the InnoSetupScriptBuilder#cp method where file copies were inadvertently skipped. - Changed the condition from `return if @files.add?(source, target)` to `return unless @files.add?(source, target)` to ensure files are copied when not already present. - This change corrects the file handling logic, ensuring that new file copies are performed as intended. This bug fix resolves an issue where the addition of new files to the build process was being erroneously bypassed, leading to missing files in the output. --- lib/ocran/inno_setup_script_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ocran/inno_setup_script_builder.rb b/lib/ocran/inno_setup_script_builder.rb index 4648f69..6cd8b2c 100644 --- a/lib/ocran/inno_setup_script_builder.rb +++ b/lib/ocran/inno_setup_script_builder.rb @@ -47,7 +47,7 @@ def cp(source, target) raise "The file does not exist (#{source})" end - return if @files.add?(source, target) + return unless @files.add?(source, target) @_files << { source: source,