From 38ea89c6e8c7d266198edd7ad970cc199d1a642e Mon Sep 17 00:00:00 2001 From: Mohammed159159 Date: Fri, 17 May 2024 11:45:11 +0300 Subject: [PATCH] fix: Display deletedfiles correctly in select --- src/modals/resyncDelFileModal.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modals/resyncDelFileModal.ts b/src/modals/resyncDelFileModal.ts index 8ce9a0e..ac4cf64 100644 --- a/src/modals/resyncDelFileModal.ts +++ b/src/modals/resyncDelFileModal.ts @@ -70,9 +70,9 @@ export default class ResyncDelFileModal extends Modal { // Check which files are actually present const deletedArticles = await Promise.all(allArticles.filter(async article => !(await this.fileManager.isArticleSaved(article)))); - return deletedArticles.map((article: Article) => - ({ uri: article.metadata.url, filename: this.fileManager.getNewArticleFilePath(article)}) - ); + return await Promise.all(deletedArticles.map(async (article: Article) => + ({ uri: article.metadata.url, filename: (await this.fileManager.getNewArticleFilePath(article)).split('//')[1]}) + )); } async startResync(selectedFiles: SyncedFile[]): Promise {