| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0a1474d commit 19d7113
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1566,10 +1566,7 @@ if (isWindows) { | |||
| 1566 | 1566 | ||
| 1567 | 1567 | const emptyObj = ObjectCreate(null); | |
| 1568 | 1568 | function realpathSync(p, options) { | |
| 1569 | - if (!options) | ||
| 1570 | - options = emptyObj; | ||
| 1571 | - else | ||
| 1572 | - options = getOptions(options, emptyObj); | ||
| 1569 | + options = getOptions(options, emptyObj); | ||
| 1573 | 1570 | p = toPathIfFileURL(p); | |
| 1574 | 1571 | if (typeof p !== 'string') { | |
| 1575 | 1572 | p += ''; | |
@@ -1601,7 +1598,7 @@ function realpathSync(p, options) { | |||
| 1601 | 1598 | pos = current.length; | |
| 1602 | 1599 | ||
| 1603 | 1600 | // On windows, check that the root exists. On unix there is no need. | |
| 1604 | - if (isWindows && !knownHard[base]) { | ||
| 1601 | + if (isWindows) { | ||
| 1605 | 1602 | const ctx = { path: base }; | |
| 1606 | 1603 | binding.lstat(pathModule.toNamespacedPath(base), false, undefined, ctx); | |
| 1607 | 1604 | handleErrorFromBinding(ctx); | |
@@ -1799,7 +1796,7 @@ function realpath(p, options, callback) { | |||
| 1799 | 1796 | const ino = stats.ino.toString(32); | |
| 1800 | 1797 | id = `${dev}:${ino}`; | |
| 1801 | 1798 | if (seenLinks[id]) { | |
| 1802 | - return gotTarget(null, seenLinks[id], base); | ||
| 1799 | + return gotTarget(null, seenLinks[id]); | ||
| 1803 | 1800 | } | |
| 1804 | 1801 | } | |
| 1805 | 1802 | fs.stat(base, (err) => { | |
@@ -1812,7 +1809,7 @@ function realpath(p, options, callback) { | |||
| 1812 | 1809 | }); | |
| 1813 | 1810 | } | |
| 1814 | 1811 | ||
| 1815 | - function gotTarget(err, target, base) { | ||
| 1812 | + function gotTarget(err, target) { | ||
| 1816 | 1813 | if (err) return callback(err); | |
| 1817 | 1814 | ||
| 1818 | 1815 | gotResolvedLink(pathModule.resolve(previous, target)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments