update to use new checkExistsAndCreateDir api

This commit is contained in:
Abhinav 2023-03-23 12:21:01 +05:30
parent 6d578a534d
commit c3e1fc99b7
2 changed files with 4 additions and 6 deletions

View file

@ -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(

View file

@ -9,7 +9,7 @@ export interface AppUpdateInfo {
export interface ElectronAPIs {
exists: (path: string) => boolean;
checkExistsAndCreateCollectionDir: (dirPath: string) => Promise<void>;
checkExistsAndCreateDir: (dirPath: string) => Promise<void>;
checkExistsAndRename: (
oldDirPath: string,
newDirPath: string