fix: unwanted not-found in case a source starting with ".." is configured in the vfs
Massimo Melina committed
Apr 20, 2025 at 19:07 UTC
2e1aeaf961b781fb9ec8169e959ec9f129b5a1f5
1 file changed
+1
-1
src/vfs.ts
+1
-1
@@ -142,7 +142,7 @@ export async function nodeStats(ret: VfsNode) {
142
143
async function isHiddenFile(path: string) {
144
return IS_WINDOWS ? new Promise(res => fswin.getAttributes(path, x => res(x?.IS_HIDDEN)))
145
- : path[0] === '.'
145
+ : path[path.lastIndexOf('/') + 1] === '.'
146
}
147
148
export async function getNodeByName(name: string, parent: VfsNode) {