Archived
fix: normalize Windows path suggestions
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@jmfederico/pi-web": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Normalize allowed external path suggestions on Windows so configured absolute paths use platform separators consistently.
|
||||||
@@ -206,8 +206,8 @@ function pathSuggestionPrefix(query: string): { directoryPrefix: string; searchP
|
|||||||
|
|
||||||
function appendRequestPath(base: string, name: string): string {
|
function appendRequestPath(base: string, name: string): string {
|
||||||
if (base === "") return name;
|
if (base === "") return name;
|
||||||
if (hasTrailingPathSeparator(base)) return `${base}${name}`;
|
|
||||||
if (isAbsolute(base) || win32.isAbsolute(base)) return join(base, name);
|
if (isAbsolute(base) || win32.isAbsolute(base)) return join(base, name);
|
||||||
|
if (hasTrailingPathSeparator(base)) return `${base}${name}`;
|
||||||
return `${base}/${name}`;
|
return `${base}/${name}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user