diff --git a/.gitignore b/.gitignore index f4739a6f..72a523f2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ nbactions.xml src/site/markdown/*.html target/ +/.classpath +/.project diff --git a/src/main/java/org/microbean/helm/chart/HelmIgnorePathMatcher.java b/src/main/java/org/microbean/helm/chart/HelmIgnorePathMatcher.java index 40c986e9..19995df1 100644 --- a/src/main/java/org/microbean/helm/chart/HelmIgnorePathMatcher.java +++ b/src/main/java/org/microbean/helm/chart/HelmIgnorePathMatcher.java @@ -259,11 +259,11 @@ public void addPatterns(final Collection stringPatterns) { regex.append("\\."); break; case '*': - regex.append("[^").append(File.separator).append("]*"); - break; + regex.append("[^\\\\]*"); + break; case '?': - regex.append("[^").append(File.separator).append("]?"); - break; + regex.append("[^\\\\]?"); + break; default: regex.append(c); break; diff --git a/src/main/java/org/microbean/helm/chart/StreamOrientedChartLoader.java b/src/main/java/org/microbean/helm/chart/StreamOrientedChartLoader.java index 6446a261..9fea0f0a 100644 --- a/src/main/java/org/microbean/helm/chart/StreamOrientedChartLoader.java +++ b/src/main/java/org/microbean/helm/chart/StreamOrientedChartLoader.java @@ -273,6 +273,10 @@ private final void addFile(final NavigableMap chartBuilde Objects.requireNonNull(chartBuilders); Objects.requireNonNull(path); Objects.requireNonNull(stream); + + if (path.length() == 0) { + return; + } final Chart.Builder builder = getChartBuilder(chartBuilders, path); if (builder == null) {