mirror of
https://github.com/zadam/trilium.git
synced 2025-01-10 01:00:43 +08:00
adding file length limit to tar export
This commit is contained in:
parent
ed2afe5c20
commit
295af1f43e
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue