Files
searchi/apps/desktop/src/path-display.ts
T

6 lines
278 B
TypeScript
Raw Normal View History

/** Explorer-style labels; callers retain the original path for file operations. */
export function displayPath(path: string) {
if (path.startsWith("\\\\?\\UNC\\")) return "\\\\" + path.slice(8);
if (/^\\\\\?\\[A-Za-z]:\\/.test(path)) return path.slice(4);
return path;
}