Skip to content

Fix single star into double star#7

Open
klauspost wants to merge 1 commit into
yargevad:masterfrom
klauspost:fix-single-star-globs
Open

Fix single star into double star#7
klauspost wants to merge 1 commit into
yargevad:masterfrom
klauspost:fix-single-star-globs

Conversation

@klauspost
Copy link
Copy Markdown

Single star into double star did not work as expected.

Pattern a/b/*/e.f/** would not match a/b/c/e.f/g since the top level glob would be performed on a path ending with a /. Using filepath.Join(match, glob) will remove the trailing slash.

Two tests included for regression tests. And as a side bonus tests will now also pass on Windows.

Single star into double star did not work as expected.

Pattern `a/b/*/e.f/**` would not match `a/b/c/e.f/g` since the top level glob would be performed on a path ending with a `/`. Using `filepath.Join(match, glob)` will remove the trailing slash.

Two tests included for regression tests. And as a side bonus tests will now also pass on Windows.
@klauspost klauspost changed the title Fix single start into double star Fix single star into double star Dec 12, 2023
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