Fix/logic errors#17
Closed
woelper wants to merge 2 commits into
Closed
Conversation
…mments - Swap doc comments on exclude_filters/include_filters (they were reversed) - Fix AND-vs-OR logic bug in run(): when both overwrite_if_newer and overwrite_if_size_differs are set, the old code required both conditions to be true (AND semantics). Each check could independently continue-skip the file, so a newer file with the same size would be skipped even though overwrite_if_newer was satisfied. Changed to OR semantics: copy if any enabled condition matches. - Fix the same first-wins bug in copy_file() (jwalk path): overwrite_if_newer always returned early, so overwrite_if_size_differs was never evaluated when both flags were set. https://claude.ai/code/session_01VLuMqvewnrGXovLZ4Reqss
…ogic Tests for bug 2 (run()) and bug 3 (run_par() / copy_file()): - overwrite_or_newer_same_size: source IS newer, same size → must copy - overwrite_or_size_differs_not_newer: sizes differ, source is older → must copy Both scenarios are covered for both run() and run_par() (jwalk path). These tests would have failed under the old AND-semantics implementation. https://claude.ai/code/session_01VLuMqvewnrGXovLZ4Reqss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swap doc comments on exclude_filters/include_filters (they were reversed)
Fix AND-vs-OR logic bug in run(): when both overwrite_if_newer and
overwrite_if_size_differs are set, the old code required both conditions
to be true (AND semantics). Each check could independently continue-skip
the file, so a newer file with the same size would be skipped even though
overwrite_if_newer was satisfied. Changed to OR semantics: copy if any
enabled condition matches.
Fix the same first-wins bug in copy_file() (jwalk path): overwrite_if_newer
always returned early, so overwrite_if_size_differs was never evaluated when
both flags were set.