(originalPath: string)
| 31 | } |
| 32 | |
| 33 | export function normalizePath(originalPath: string) { |
| 34 | let normalized = normalizePathBase(originalPath) |
| 35 | |
| 36 | // Make sure Windows network share paths are normalized properly |
| 37 | // They have to begin with two slashes or they won't resolve correctly |
| 38 | if ( |
| 39 | originalPath.startsWith('\\\\') && |
| 40 | normalized.startsWith('/') && |
| 41 | !normalized.startsWith('//') |
| 42 | ) { |
| 43 | return `/${normalized}` |
| 44 | } |
| 45 | |
| 46 | return normalized |
| 47 | } |
no test coverage detected