mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: invalid expand path
This commit is contained in:
parent
80b241be1b
commit
eeb2aeee00
1 changed files with 5 additions and 1 deletions
|
|
@ -290,7 +290,11 @@ class FlattenLayer extends CompressLayer {
|
|||
[rootNode],
|
||||
async node => {
|
||||
const overflowChar = node.path[path.length + 1]
|
||||
const match = path.startsWith(node.path) && (overflowChar === '/' || !overflowChar)
|
||||
const nextChar = path.slice(node.path.length, node.path.length + 1)
|
||||
const match =
|
||||
path.startsWith(node.path) &&
|
||||
(overflowChar === '/' || !overflowChar) &&
|
||||
(!node.path || nextChar === '/' || !nextChar)
|
||||
if (node.path) {
|
||||
// rootNode.path === ''
|
||||
if (match) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue