mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
web: fix bulk exists check for files
This commit is contained in:
committed by
Abdullah Atta
parent
dbc907ceeb
commit
02fdec74ce
@@ -576,9 +576,10 @@ async function exists(filename: string | FileHandle) {
|
||||
}
|
||||
|
||||
async function bulkExists(filenames: string[]) {
|
||||
return Array.from(
|
||||
new Set(filenames).difference(new Set(await streamablefs.list())).values()
|
||||
const files = (await streamablefs.list()).map((c) =>
|
||||
c.replace(/-chunk-\d+/, "")
|
||||
);
|
||||
return Array.from(new Set(filenames).difference(new Set(files)).values());
|
||||
}
|
||||
|
||||
type FileMetadata = {
|
||||
|
||||
Reference in New Issue
Block a user