fix: normalize Windows path suggestions

This commit is contained in:
Federico Jaramillo Martinez
2026-06-23 20:03:44 +02:00
parent c2e2a29847
commit 2bb6e48a8b
2 changed files with 6 additions and 1 deletions
@@ -0,0 +1,5 @@
---
"@jmfederico/pi-web": patch
---
Normalize allowed external path suggestions on Windows so configured absolute paths use platform separators consistently.
+1 -1
View File
@@ -206,8 +206,8 @@ function pathSuggestionPrefix(query: string): { directoryPrefix: string; searchP
function appendRequestPath(base: string, name: string): string {
if (base === "") return name;
if (hasTrailingPathSeparator(base)) return `${base}${name}`;
if (isAbsolute(base) || win32.isAbsolute(base)) return join(base, name);
if (hasTrailingPathSeparator(base)) return `${base}${name}`;
return `${base}/${name}`;
}