mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
updated demo document based on changes in tar format
This commit is contained in:
parent
15a2fe2570
commit
ae8a2bfb1b
BIN
db/demo.tar
BIN
db/demo.tar
Binary file not shown.
@ -115,24 +115,28 @@ async function importTar(importContext, fileBuffer, importRootNote) {
|
|||||||
function getNoteId(noteMeta, filePath) {
|
function getNoteId(noteMeta, filePath) {
|
||||||
let noteId;
|
let noteId;
|
||||||
|
|
||||||
if (noteMeta) {
|
const filePathNoExt = getTextFileWithoutExtension(filePath);
|
||||||
noteId = getNewNoteId(noteMeta.noteId);
|
|
||||||
|
|
||||||
createdPaths[filePath] = noteId;
|
if (noteMeta) {
|
||||||
|
if (filePathNoExt in createdPaths) {
|
||||||
|
noteId = createdPaths[filePathNoExt];
|
||||||
|
noteIdMap[noteMeta.noteId] = noteId;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
noteId = getNewNoteId(noteMeta.noteId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const filePathNoExt = getTextFileWithoutExtension(filePath);
|
|
||||||
|
|
||||||
if (filePathNoExt in createdPaths) {
|
if (filePathNoExt in createdPaths) {
|
||||||
noteId = createdPaths[filePathNoExt];
|
noteId = createdPaths[filePathNoExt];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
noteId = utils.newEntityId();
|
noteId = utils.newEntityId();
|
||||||
}
|
}
|
||||||
|
|
||||||
createdPaths[filePathNoExt] = noteId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createdPaths[filePathNoExt] = noteId;
|
||||||
|
|
||||||
return noteId;
|
return noteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user