trilium
trilium copied to clipboard
(Bug report) Long note names are all truncated in the exports
Trilium Version
0.62.3
What operating system are you using?
Windows
What is your setup?
Local (no sync)
Operating System Version
Windows 11
Description
It looks like Trilium trims all the long files during exports leads to all broken exports, unfortunately. the pdf files are missing .pdf extensions, it might be related to long file names issue.
I checked both md and html exports and that seems to be the case
Error logs
No response
No one has this issue? This is a bummer because the files with truncated names cant be found or linked in the exported files :(
It might just be a Windows limitation - there could be a path size limit
I am really not sure, the files are truncated already in the zip files.
How long are the note names? Can you share one?
Look at this image, you can see they are cut off and they have no file extension either. I think this is Trilium's exporting bug or something along those lines.
Same with the html export. As you files with shorters names have proper file extentions
And this is the actual inside of the zip. They seem truncated inside
Here is the actual content in Trilium, as you see the images are there.
This is just one sample I found quickly. I had many other instances in this export so this is not the only page I have this issue.
Yes, long names are truncated mostly because of the Windows path length limitation. If the filenames were too long, it would be impossible to extract the ZIP file, so Trilium is being conservative.
The full filenames are preserved in the !!!meta.json file, so when importing into Trilium there's no loss.
That is fine, but that renders the exported repo totally useless give I now have half the stuff broken :( Is there a solution to this without going to the whole repo and manually fixing every file and where they are linked which is a super complicated task for a human.
@zadam
Why not offer tar or another format that does not truncate long files? Also most of these files with long names were created by the Trilium Webclipper, at least in my case the user is not at fault.
While Trilium may have the capability to export TAR files, extracting them on a Windows machine remains challenging due to system limitations. However, you can attempt to overcome this obstacle by adjusting your Windows configuration settings. Refer to Microsoft's documentation on modifying Windows configurations to address file path limitations for guidance: link.
7Z perfectly opens tar files, I do not see why Tar is not a solution. As of now the exports are crippled for given conditions, and it seems like a better approach then asking people to mess with windows and the registry.
Btw most people won't even realize that their exports might be broken due to this until they try to open these files. So really this is a big user hindrance in my view