1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00

Desktop, Cli: Fixes #3689: Fixed note export when there are folders with non-existing parents. Also fixed long path issue on Windows.

This commit is contained in:
Laurent Cozic
2020-09-07 22:12:51 +01:00
parent 08d4b5a714
commit a424e3c899
5 changed files with 32 additions and 38 deletions

View File

@ -276,7 +276,9 @@ class InteropService {
const exportedNoteIds = [];
let resourceIds = [];
const folderIds = await Folder.allIds();
// Recursively get all the folders that have valid parents
const folderIds = await Folder.childrenIds('', true);
let fullSourceFolderIds = sourceFolderIds.slice();
for (let i = 0; i < sourceFolderIds.length; i++) {
@ -327,7 +329,7 @@ class InteropService {
await queueExportItem(BaseModel.TYPE_TAG, exportedTagIds[i]);
}
const exporter = this.newModuleFromPath_('exporter', options);// this.newModuleByFormat_('exporter', exportFormat);
const exporter = this.newModuleFromPath_('exporter', options);
await exporter.init(exportPath, options);
const typeOrder = [BaseModel.TYPE_FOLDER, BaseModel.TYPE_RESOURCE, BaseModel.TYPE_NOTE, BaseModel.TYPE_TAG, BaseModel.TYPE_NOTE_TAG];