mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 01:23:57 +08:00
updated demo document based on changes in tar format
This commit is contained in:
parent
15a2fe2570
commit
ae8a2bfb1b
2 changed files with 11 additions and 7 deletions
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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue