fix: search shouldn't always return among results items with name like C:
Massimo Melina committed
Oct 31, 2023 at 23:38 UTC
c39957c5ecc28366024c21ea5203f1265120ee09
1 file changed
+2
-1
src/api.file_list.ts
+2
-1
@@ -55,7 +55,8 @@ export const get_file_list: ApiHandler = async ({ uri, offset, limit, search, c
55
async function* produceEntries() {
56
for await (const sub of walker) {
57
if (ctx.aborted) break
58
- const name = basename(getNodeName(sub))
58
+ let name = getNodeName(sub)
59
+ name = basename(name) || name // on windows, basename('C:') === ''
60
if (descriptIon.get() && name === DESCRIPT_ION)
61
continue
62
if (!filter(name))