Windows daemon paths like C:\Users\... don't start with "/", breaking the explorer sidebar, checkout status, terminals, and file attachments when connected to a Windows daemon. Consolidate three private isAbsolutePath implementations into a shared utility and use it everywhere, with correct file URI conversion for Windows and UNC paths.
6 lines
162 B
TypeScript
6 lines
162 B
TypeScript
export function isAbsolutePath(value: string): boolean {
|
|
return (
|
|
value.startsWith("/") || value.startsWith("\\\\") || /^[A-Za-z]:[\\/]/.test(value)
|
|
);
|
|
}
|