(path, type, linkPath)
| 365 | } |
| 366 | |
| 367 | function preprocessSymlinkDestination(path, type, linkPath) { |
| 368 | if (!isWindows) { |
| 369 | // No preprocessing is needed on Unix. |
| 370 | return path; |
| 371 | } |
| 372 | path = '' + path; |
| 373 | if (type === 'junction') { |
| 374 | // Junctions paths need to be absolute and \\?\-prefixed. |
| 375 | // A relative target is relative to the link's parent directory. |
| 376 | path = pathModule.resolve(linkPath, '..', path); |
| 377 | return pathModule.toNamespacedPath(path); |
| 378 | } |
| 379 | if (pathModule.isAbsolute(path)) { |
| 380 | // If the path is absolute, use the \\?\-prefix to enable long filenames |
| 381 | return pathModule.toNamespacedPath(path); |
| 382 | } |
| 383 | // Windows symlinks don't tolerate forward slashes. |
| 384 | return RegExpPrototypeSymbolReplace(/\//g, path, '\\'); |
| 385 | } |
| 386 | |
| 387 | // Constructor for file stats. |
| 388 | function StatsBase(dev, mode, nlink, uid, gid, rdev, blksize, |
no test coverage detected
searching dependent graphs…