| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1282,6 +1282,10 @@ const posix = { | |||
| 1282 | 1282 | // We get here if `from` is the exact base path for `to`. | |
| 1283 | 1283 | // For example: from='/foo/bar'; to='/foo/bar/baz' | |
| 1284 | 1284 | return to.slice(i + 2); | |
| 1285 | + } else if (fromLen > length && from.charCodeAt(i + 1) === 47/*/*/) { | ||
| 1286 | + // We get here if `to` is the exact base path for `from`. | ||
| 1287 | + // For example: from='/foo/bar/baz'; to='/foo/bar' | ||
| 1288 | + lastCommonSep = i; | ||
| 1285 | 1289 | } | |
| 1286 | 1290 | break; | |
| 1287 | 1291 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -481,7 +481,8 @@ const relativeTests = [ | |||
| 481 | 481 | ['/var/lib', '/var/apache', '../apache'], | |
| 482 | 482 | ['/var/', '/var/lib', 'lib'], | |
| 483 | 483 | ['/', '/var/lib', 'var/lib'], | |
| 484 | - ['/foo/test', '/foo/test/bar/package.json', 'bar/package.json'] | ||
| 484 | + ['/foo/test', '/foo/test/bar/package.json', 'bar/package.json'], | ||
| 485 | + ['/Users/a/web/b/test/mails', '/Users/a/web/b', '../..'] | ||
| 485 | 486 | ] | |
| 486 | 487 | ] | |
| 487 | 488 | ]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments