Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestFilesystem::read_dir_diff_paths #38

Closed
wants to merge 1 commit into from

Conversation

emesterhazy
Copy link
Collaborator

This function collects the files present in the left and right directories. It should return the path suffix with the left and right prefix stripped. This is necessary because process_opts will add the left and right prefix back to the paths returned by read_dir_diff_paths. If we don't strip the prefix, we will end up with invalid paths where the prefix is duplicated.

This went unnoticed since the current tests don't diff directories. I will add a test that diffs directories in a subsequent commit.

This function collects the files present in the `left` and `right` directories.
It should return the path suffix with the `left` and `right` prefix stripped.
This is necessary because `process_opts` will add the `left` and `right` prefix
back to the paths returned by `read_dir_diff_paths`. If we don't strip the
prefix, we will end up with invalid paths where the prefix is duplicated.

This went unnoticed since the current tests don't diff directories. I will add
a test that diffs directories in a subsequent commit.
@emesterhazy emesterhazy closed this May 6, 2024
@emesterhazy emesterhazy deleted the push-snkowsyywvlm branch May 6, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant