update to use new checkExistsAndCreateDir api
This commit is contained in:
parent
6d578a534d
commit
c3e1fc99b7
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue