mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:21:25 +00:00
fix: harden windows path handling in CI tests
This commit is contained in:
@@ -575,7 +575,18 @@ function mapContainerPathToWorkspaceRoot(params: {
|
||||
try {
|
||||
candidate = fileURLToPath(candidate);
|
||||
} catch {
|
||||
return params.filePath;
|
||||
try {
|
||||
const parsed = new URL(candidate);
|
||||
if (parsed.protocol !== "file:") {
|
||||
return params.filePath;
|
||||
}
|
||||
candidate = decodeURIComponent(parsed.pathname || "");
|
||||
if (!candidate.startsWith("/")) {
|
||||
return params.filePath;
|
||||
}
|
||||
} catch {
|
||||
return params.filePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user