diff --git a/src/services/export/tar.js b/src/services/export/tar.js index 441f62d9d..7af704f2d 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) {