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
feat(export/zip): handle empty notes for subtree
Elian Doran5270cf6284fc
diff --git a/apps/server/src/services/export/zip.ts b/apps/server/src/services/export/zip.tsindex a487d0b7f0..9bfdae5c10 100644--- a/apps/server/src/services/export/zip.ts+++ b/apps/server/src/services/export/zip.ts@@ -75,6 +75,9 @@ async function exportToZip(taskContext: TaskContext, branch: BBranch, format: "hfunction getDataFileName(type: string | null, mime: string, baseFileName: string, existingFileNames: Record<string, number>): string {let fileName = baseFileName.trim();+ if (!fileName) {+ fileName = "note";+ }// Crop fileName to avoid its length exceeding 30 and prevent cutting into the extension.if (fileName.length > 30) {