Skip to content

Commit 458e361

Browse files
committed
fix regex issue
1 parent dc94715 commit 458e361

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/de/thetaphi/forbiddenapis/cli/CliMain.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,11 @@ public void run() throws ExitException {
337337
ZipEntry entry;
338338
while ((entry = zipin.getNextEntry()) != null) {
339339
// cleanup name in the zip file (fix trailing slash and windows separators):
340-
final String name = entry.getName().replace('\\', '/').replaceFirst("/+", "");
340+
final String name = entry.getName().replace('\\', '/').replaceFirst("^/+", "");
341341
next:
342342
for (String ipattern : includes) {
343343
if (SelectorUtils.match(ipattern, name)) {
344-
if (excludes!= null) {
344+
if (excludes != null) {
345345
for (String epattern : excludes) {
346346
if (SelectorUtils.match(epattern, name)) {
347347
break next;

0 commit comments

Comments
 (0)