move remove before new files export

This commit is contained in:
Abhinav 2023-04-25 16:07:46 +05:30
parent 438952e34c
commit 1932912542

View file

@ -269,6 +269,17 @@ class ExportService {
exportRecord.exportedCollectionPaths
);
const collectionIDNameMap = getCollectionNameMap(collections);
const removedFileUIDs = getDeletedExportedFiles(
userPersonalFiles,
exportRecord
);
if (removedFileUIDs?.length > 0) {
addLogLine(`removing ${removedFileUIDs.length} files`);
await this.fileRemover(removedFileUIDs, exportDir);
}
const renamedCollections = getRenamedCollections(
userCollections,
exportRecord
@ -300,15 +311,6 @@ class ExportService {
exportDir
);
}
const removedFileUIDs = getDeletedExportedFiles(
userPersonalFiles,
exportRecord
);
if (removedFileUIDs?.length > 0) {
addLogLine(`removing ${removedFileUIDs.length} files`);
await this.fileRemover(removedFileUIDs, exportDir);
}
const deletedExportedCollections = getDeletedExportedCollections(
userCollections,