mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
adding file length limit to tar export
This commit is contained in:
parent
ed2afe5c20
commit
295af1f43e
@ -84,7 +84,12 @@ async function exportToTar(taskContext, branch, format, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const completeTitle = branch.prefix ? (branch.prefix + ' - ' + note.title) : note.title;
|
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]);
|
const notePath = parentMeta.notePath.concat([note.noteId]);
|
||||||
|
|
||||||
if (note.noteId in noteIdToMeta) {
|
if (note.noteId in noteIdToMeta) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user