| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3f95440 commit f29451d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1598,10 +1598,7 @@ if (isWindows) { | |||
| 1598 | 1598 | ||
| 1599 | 1599 | const emptyObj = ObjectCreate(null); | |
| 1600 | 1600 | function realpathSync(p, options) { | |
| 1601 | - if (!options) | ||
| 1602 | - options = emptyObj; | ||
| 1603 | - else | ||
| 1604 | - options = getOptions(options, emptyObj); | ||
| 1601 | + options = getOptions(options, emptyObj); | ||
| 1605 | 1602 | p = toPathIfFileURL(p); | |
| 1606 | 1603 | if (typeof p !== 'string') { | |
| 1607 | 1604 | p += ''; | |
@@ -1633,7 +1630,7 @@ function realpathSync(p, options) { | |||
| 1633 | 1630 | pos = current.length; | |
| 1634 | 1631 | ||
| 1635 | 1632 | // On windows, check that the root exists. On unix there is no need. | |
| 1636 | - if (isWindows && !knownHard[base]) { | ||
| 1633 | + if (isWindows) { | ||
| 1637 | 1634 | const ctx = { path: base }; | |
| 1638 | 1635 | binding.lstat(pathModule.toNamespacedPath(base), false, undefined, ctx); | |
| 1639 | 1636 | handleErrorFromBinding(ctx); | |
@@ -1831,7 +1828,7 @@ function realpath(p, options, callback) { | |||
| 1831 | 1828 | const ino = stats.ino.toString(32); | |
| 1832 | 1829 | id = `${dev}:${ino}`; | |
| 1833 | 1830 | if (seenLinks[id]) { | |
| 1834 | - return gotTarget(null, seenLinks[id], base); | ||
| 1831 | + return gotTarget(null, seenLinks[id]); | ||
| 1835 | 1832 | } | |
| 1836 | 1833 | } | |
| 1837 | 1834 | fs.stat(base, (err) => { | |
@@ -1844,7 +1841,7 @@ function realpath(p, options, callback) { | |||
| 1844 | 1841 | }); | |
| 1845 | 1842 | } | |
| 1846 | 1843 | ||
| 1847 | - function gotTarget(err, target, base) { | ||
| 1844 | + function gotTarget(err, target) { | ||
| 1848 | 1845 | if (err) return callback(err); | |
| 1849 | 1846 | ||
| 1850 | 1847 | gotResolvedLink(pathModule.resolve(previous, target)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments