From 16563eaba4cdd47097cd1a40011b8b5fb5994f79 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 15 May 2021 13:22:54 +0200 Subject: [PATCH] limit data base filename in ZIP export to 30 characters --- src/services/export/zip.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/export/zip.js b/src/services/export/zip.js index 8d98c5825..a0c88b694 100644 --- a/src/services/export/zip.js +++ b/src/services/export/zip.js @@ -73,6 +73,10 @@ function exportToZip(taskContext, branch, format, res) { let fileName = baseFileName; + if (fileName.length > 30) { + fileName = fileName.substr(0, 30); + } + // if the note is already named with extension (e.g. "jquery.js"), then it's silly to append exact same extension again if (newExtension && existingExtension !== "." + newExtension.toLowerCase()) { fileName += "." + newExtension;