Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
updated demo document based on changes in tar format
zadamae8a2bfb1b84
diff --git a/db/demo.tar b/db/demo.tarindex 4edf706364..599f8a0b98 100644Binary files a/db/demo.tar and b/db/demo.tar differdiff --git a/src/services/import/tar.js b/src/services/import/tar.jsindex 64a70e0b7a..899fc5065b 100644--- a/src/services/import/tar.js+++ b/src/services/import/tar.js@@ -115,24 +115,28 @@ async function importTar(importContext, fileBuffer, importRootNote) {function getNoteId(noteMeta, filePath) {let noteId;- if (noteMeta) {- noteId = getNewNoteId(noteMeta.noteId);+ const filePathNoExt = getTextFileWithoutExtension(filePath);- createdPaths[filePath] = noteId;+ if (noteMeta) {+ if (filePathNoExt in createdPaths) {+ noteId = createdPaths[filePathNoExt];+ noteIdMap[noteMeta.noteId] = noteId;+ }+ else {+ noteId = getNewNoteId(noteMeta.noteId);+ }}else {- const filePathNoExt = getTextFileWithoutExtension(filePath);-if (filePathNoExt in createdPaths) {noteId = createdPaths[filePathNoExt];}else {noteId = utils.newEntityId();}-- createdPaths[filePathNoExt] = noteId;}+ createdPaths[filePathNoExt] = noteId;+return noteId;}