diff --git a/src/provider/local.ts b/src/provider/local.ts index 8cb79b6..6549f98 100644 --- a/src/provider/local.ts +++ b/src/provider/local.ts @@ -40,7 +40,7 @@ async function localJson(comicId: string, path: string): Promise { if (parsed === null) return null; const [providerKey, id] = parsed; const pth = dataPath(`comics/${providerKey}/${id}/${path}`); - if (!pathExists(pth)) return null; + if (!await pathExists(pth)) return null; return JSON.parse(await FileSystem.readAsStringAsync(pth)); } @@ -48,7 +48,7 @@ async function localJson(comicId: string, path: string): Promise { const localProvider: LocalProvider = { async listComics() { const directory = dataPath('comics/'); - if (!pathExists(directory)) return []; + if (!await pathExists(directory)) return []; const providers = await FileSystem.readDirectoryAsync(directory) as NonLocalProviderKey[]; const comics: LocalComicMetadata[] = []; for (const provider of providers) {