Skip to content

Commit

Permalink
Fix file copy logic in InnoSetupScriptBuilder#cp
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
shinokaro committed Jun 14, 2024
1 parent 02dece4 commit 59dc864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ocran/inno_setup_script_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 59dc864

Please sign in to comment.