Skip to content

Commit 81c523d

Browse files
authored
Fix system path separators for config globbing (#2327)
fixes #2279
1 parent 1559dc5 commit 81c523d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

maestro-orchestra/src/main/java/maestro/orchestra/workspace/WorkspaceExecutionPlanner.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ object WorkspaceExecutionPlanner {
6363
val globs = workspaceConfig.flows ?: listOf("*")
6464

6565
val matchers = globs.flatMap { glob ->
66-
directories.map { it.fileSystem.getPathMatcher("glob:${it.pathString}/$glob") }
66+
directories.map { it.fileSystem.getPathMatcher(escapeSlashesForWindows("glob:${it.pathString}${it.fileSystem.separator}$glob")) }
6767
}
6868

6969
val unsortedFlowFiles = flowFiles + flowFilesInDirs.filter { path ->
@@ -176,6 +176,10 @@ object WorkspaceExecutionPlanner {
176176
return file.fileName.toString().substringBeforeLast(".")
177177
}
178178

179+
private fun escapeSlashesForWindows(pathString: String): String {
180+
return pathString.replace("\\","\\\\")
181+
}
182+
179183
data class FlowSequence(
180184
val flows: List<Path>,
181185
val continueOnFailure: Boolean? = true,

0 commit comments

Comments
 (0)