From c3e1fc99b7163665fb1615e047e6fba50c0b42ca Mon Sep 17 00:00:00 2001 From: Abhinav Date: Thu, 23 Mar 2023 12:21:01 +0530 Subject: [PATCH] update to use new checkExistsAndCreateDir api --- src/services/exportService.ts | 8 +++----- src/types/electron/index.ts | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/services/exportService.ts b/src/services/exportService.ts index b9a07f48c..c45de0f61 100644 --- a/src/services/exportService.ts +++ b/src/services/exportService.ts @@ -77,9 +77,7 @@ class ExportService { return; } const newExportDir = `${newRootDir}/${ENTE_EXPORT_DIRECTORY}`; - await this.electronAPIs.checkExistsAndCreateCollectionDir( - newExportDir - ); + await this.electronAPIs.checkExistsAndCreateDir(newExportDir); callback(newExportDir); } catch (e) { logError(e, 'changeExportDirectory failed'); @@ -408,10 +406,10 @@ class ExportService { exportFolder, collection ); - await this.electronAPIs.checkExistsAndCreateCollectionDir( + await this.electronAPIs.checkExistsAndCreateDir( collectionFolderPath ); - await this.electronAPIs.checkExistsAndCreateCollectionDir( + await this.electronAPIs.checkExistsAndCreateDir( getMetadataFolderPath(collectionFolderPath) ); await this.addCollectionExportedRecord( diff --git a/src/types/electron/index.ts b/src/types/electron/index.ts index 798c6b653..dc7d41511 100644 --- a/src/types/electron/index.ts +++ b/src/types/electron/index.ts @@ -9,7 +9,7 @@ export interface AppUpdateInfo { export interface ElectronAPIs { exists: (path: string) => boolean; - checkExistsAndCreateCollectionDir: (dirPath: string) => Promise; + checkExistsAndCreateDir: (dirPath: string) => Promise; checkExistsAndRename: ( oldDirPath: string, newDirPath: string