Skip to content

Commit

Permalink
'#2095 Corrects pattern matching when patterns starts with *
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdalla committed May 9, 2024
1 parent 170bd00 commit 7682505
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Collection<LeapArtifactsPlugin> getPlugins() {

public boolean hasPatternMatch(String file, LeapArtifactsPlugin plugin) {
for (String pattern : plugin.patterns) {
if (pattern.startsWith("*/")) {
if (pattern.startsWith("*")) {
pattern = "*" + pattern;
}
if (FileSystems.getDefault().getPathMatcher("glob:" + pattern).matches(Path.of(file))) {
Expand Down

0 comments on commit 7682505

Please sign in to comment.