369
370
if (isPathSeparator(path.charCodeAt(1))) {
371
>
// Matched double path separator at beginning
path.ts
372
>
let j = 2;
373
>
let last = j;
374
>
// Match 1 or more non-path separators
375
>
while (j < len && !isPathSeparator(path.charCodeAt(j))) {
376
>
j++;
377
>
}
378
>
if (j < len && j !== last) {
379
>
const firstPart = path.slice(last, j);
380
>
// Matched!
381
>
last = j;
382
>
// Match 1 or more path separators
383
>
while (j < len && isPathSeparator(path.charCodeAt(j))) {
384
>
j++;
385
>
}
386
>
if (j < len && j !== last) {
387
>
// Matched!
388
>
last = j;
389
>
// Match 1 or more non-path separators
390
>
while (j < len && !isPathSeparator(path.charCodeAt(j))) {
391
>
j++;
392
>
}
393
>
if (j === len) {
394
// We matched a UNC root only
395
// Return the normalized version of the UNC root since there