Skip to content

Commit 07f6d75

Browse files
authored
fix: cli not honoring window paths correctly (#7470)
1 parent 99694c1 commit 07f6d75

File tree

1 file changed

+5
-1
lines changed
  • cli/src/main/java/org/owasp/dependencycheck

1 file changed

+5
-1
lines changed

cli/src/main/java/org/owasp/dependencycheck/App.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,11 @@ private Set<File> scanAntStylePaths(List<String> antStylePaths, int symLinkDepth
379379
String include = file.replace('\\', '/');
380380
final File baseDir;
381381
final int pos = getLastFileSeparator(include);
382-
final String tmpBase = include.substring(0, pos);
382+
String tmpBase = include.substring(0, pos);
383+
//fix for windows style paths scanning c:/temp.
384+
if (tmpBase.endsWith(":")) {
385+
tmpBase += "/";
386+
}
383387
final String tmpInclude = include.substring(pos + 1);
384388
if (tmpInclude.indexOf('*') >= 0 || tmpInclude.indexOf('?') >= 0
385389
|| new File(include).isFile()) {

0 commit comments

Comments
 (0)