You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
All: Fixes #597: Also import sub-notebooks when importing JEX data
This commit is contained in:
@@ -157,7 +157,7 @@ class InteropService {
|
||||
|
||||
async export(options) {
|
||||
const exportPath = options.path ? options.path : null;
|
||||
const sourceFolderIds = options.sourceFolderIds ? options.sourceFolderIds : [];
|
||||
let sourceFolderIds = options.sourceFolderIds ? options.sourceFolderIds : [];
|
||||
const sourceNoteIds = options.sourceNoteIds ? options.sourceNoteIds : [];
|
||||
const exportFormat = options.format ? options.format : 'jex';
|
||||
const result = { warnings: [] }
|
||||
@@ -174,6 +174,14 @@ class InteropService {
|
||||
let resourceIds = [];
|
||||
const folderIds = await Folder.allIds();
|
||||
|
||||
let fullSourceFolderIds = sourceFolderIds.slice();
|
||||
for (let i = 0; i < sourceFolderIds.length; i++) {
|
||||
const id = sourceFolderIds[i];
|
||||
const childrenIds = await Folder.childrenIds(id);
|
||||
fullSourceFolderIds = fullSourceFolderIds.concat(childrenIds);
|
||||
}
|
||||
sourceFolderIds = fullSourceFolderIds;
|
||||
|
||||
for (let folderIndex = 0; folderIndex < folderIds.length; folderIndex++) {
|
||||
const folderId = folderIds[folderIndex];
|
||||
if (sourceFolderIds.length && sourceFolderIds.indexOf(folderId) < 0) continue;
|
||||
|
||||
Reference in New Issue
Block a user