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
adding file length limit to tar export
zadam295af1f43e52
diff --git a/src/services/export/tar.js b/src/services/export/tar.jsindex 441f62d9db..7af704f2d4 100644--- a/src/services/export/tar.js+++ b/src/services/export/tar.js@@ -84,7 +84,12 @@ async function exportToTar(taskContext, branch, format, res) {}const completeTitle = branch.prefix ? (branch.prefix + ' - ' + note.title) : note.title;- const baseFileName = sanitize(completeTitle);+ let baseFileName = sanitize(completeTitle);++ if (baseFileName.length > 200) { // actual limit is 256 bytes(!) but let's be conservative+ baseFileName = baseFileName.substr(0, 200);+ }+const notePath = parentMeta.notePath.concat([note.noteId]);if (note.noteId in noteIdToMeta) {