diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/util/Globs.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/util/Globs.kt index cb5032c5b18..3d1e2f1b9d7 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/util/Globs.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/util/Globs.kt @@ -25,7 +25,9 @@ internal fun expandGlobTo(unexpandedPath: File, output: MutableCollection) val basePath: File = paths[index - 1] val basePathAsPath: Path = basePath.toPath() - val pattern: String = unexpandedPath.relativeTo(basePath).path + val pattern: String = unexpandedPath.relativeTo(basePath).path.let { pattern -> + if (File.separatorChar == '\\') pattern.replace("\\", "\\\\") else pattern + } val matcher: PathMatcher = FileSystems.getDefault().getPathMatcher("glob:$pattern") Files.walkFileTree(basePathAsPath, object : SimpleFileVisitor() {