update to use new checkExistsAndCreateDir api
This commit is contained in:
parent
6d578a534d
commit
c3e1fc99b7
|
@ -77,9 +77,7 @@ class ExportService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const newExportDir = `${newRootDir}/${ENTE_EXPORT_DIRECTORY}`;
|
const newExportDir = `${newRootDir}/${ENTE_EXPORT_DIRECTORY}`;
|
||||||
await this.electronAPIs.checkExistsAndCreateCollectionDir(
|
await this.electronAPIs.checkExistsAndCreateDir(newExportDir);
|
||||||
newExportDir
|
|
||||||
);
|
|
||||||
callback(newExportDir);
|
callback(newExportDir);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e, 'changeExportDirectory failed');
|
logError(e, 'changeExportDirectory failed');
|
||||||
|
@ -408,10 +406,10 @@ class ExportService {
|
||||||
exportFolder,
|
exportFolder,
|
||||||
collection
|
collection
|
||||||
);
|
);
|
||||||
await this.electronAPIs.checkExistsAndCreateCollectionDir(
|
await this.electronAPIs.checkExistsAndCreateDir(
|
||||||
collectionFolderPath
|
collectionFolderPath
|
||||||
);
|
);
|
||||||
await this.electronAPIs.checkExistsAndCreateCollectionDir(
|
await this.electronAPIs.checkExistsAndCreateDir(
|
||||||
getMetadataFolderPath(collectionFolderPath)
|
getMetadataFolderPath(collectionFolderPath)
|
||||||
);
|
);
|
||||||
await this.addCollectionExportedRecord(
|
await this.addCollectionExportedRecord(
|
||||||
|
|
|
@ -9,7 +9,7 @@ export interface AppUpdateInfo {
|
||||||
|
|
||||||
export interface ElectronAPIs {
|
export interface ElectronAPIs {
|
||||||
exists: (path: string) => boolean;
|
exists: (path: string) => boolean;
|
||||||
checkExistsAndCreateCollectionDir: (dirPath: string) => Promise<void>;
|
checkExistsAndCreateDir: (dirPath: string) => Promise<void>;
|
||||||
checkExistsAndRename: (
|
checkExistsAndRename: (
|
||||||
oldDirPath: string,
|
oldDirPath: string,
|
||||||
newDirPath: string
|
newDirPath: string
|
||||||
|
|
Loading…
Reference in a new issue