Skip to content

Commit 86c871b

Browse files
Change separator for windows
1 parent ea34d22 commit 86c871b

File tree

1 file changed

+3
-2
lines changed
  • joern-cli/frontends/php2cpg/src/main/scala/io/joern/php2cpg/utils

1 file changed

+3
-2
lines changed

joern-cli/frontends/php2cpg/src/main/scala/io/joern/php2cpg/utils/PathFilter.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import scala.util.matching.Regex
1010
class PathFilter(excludeOverrides: Option[List[String]]) {
1111
private val logger = LoggerFactory.getLogger(this.getClass)
1212

13-
private val startOrSep = s"^([^${File.separator}]+${File.separator})*"
14-
private val anyDirSuffix = s"${File.separator}.*"
13+
private val sep = if (File.separator == "/") File.separator else "\\\\"
14+
private val startOrSep = s"^([^$sep]+$sep)*"
15+
private val anyDirSuffix = s"$sep.*"
1516

1617
def dirExclude(dirName: String): Regex = {
1718
s"${startOrSep}${correctPath(dirName)}${anyDirSuffix}".r

0 commit comments

Comments
 (0)