zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

[bug] Error when unziping exported notes files #1734

Closed cplerch closed 2 years ago

cplerch commented 3 years ago

Version: 0.46.4-beta running on Windows 10 Pro (x64) trilium-2021-03-11.log

Neither Windows Explorer nor 7-zip can unzip compressed note files from exported archives, while unziping exported file !!!meta.json works fine. The problem is not with the archive itself, but with each and every compressed notes file (both formats html and markdown are affected), while exporting to OPML format works fine.

zadam commented 3 years ago

Hi, I think it's the same issue as described in #1122 and in thejoshwolfe/yazl#66 

Unfortunately I don't know how to solve that :(

cplerch commented 3 years ago

Would it be possible to use tar format instead of zip?

Am Do., 11. März 2021 um 19:44 Uhr schrieb zadam @.***>:

Hi, I think it's the same issue as described in #1122 https://github.com/zadam/trilium/issues/1122 and in thejoshwolfe/yazl#66 https://github.com/thejoshwolfe/yazl/issues/66

Unfortunately I don't know how to solve that :(

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zadam/trilium/issues/1734#issuecomment-796958618, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACADLWZBDW2LVQ6P4TRMTH3TDEFPZANCNFSM4Y7UWSCA .

zadam commented 3 years ago

Actually tar was used as an export format previously. And it sucked a lot, especially with unicode (PAX extension is not supported everywhere). So not getting back there.

Since I belive the actual ZIP files are not corrupted (they unzip just fine on Linux), there should be some way (some other unarchiver) to unzip them correctly in windows too.

cplerch commented 3 years ago

Will check that and come back, when I found a solution.

Am Fr., 12. März 2021 um 21:54 Uhr schrieb zadam @.***>:

Actually tar was used as an export format previously. And it sucked a lot, especially with unicode. So not getting back there.

Since I belive the actual ZIP files are not corrupted (they unzip just fine on Linux), there should be some way (some other unarchiver) to unzip them correctly in windows too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zadam/trilium/issues/1734#issuecomment-797749283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACADLW5DMJJYRSA277OVJGDTDJ5QZANCNFSM4Y7UWSCA .

cplerch commented 3 years ago

Hi, had a chance now to research this issue a little bit, hope my finding can help you.

  1. Unzipping works on Windows 10 if you use one of the unzip.exe utils included in e.g. Windows subsystem for Linux, or Git for Windows (there may as well be other packages that have ported Linux unzip util to Windows).
  2. You get correctly UTF-8 encoded text files by using these utils.
  3. However, text files unzipped by these tools still contain Unix line endings (LF) - not Windows line endings (CR LF). Could very well be the case that these line endings foreign to the Windows OS is something that fails the native Windows unzip function, although most Windows text or markdown editors can handle the deflated files.

Am Sa., 13. März 2021 um 15:53 Uhr schrieb Christian P. Lerch < @.***>:

Will check that and come back, when I found a solution.

Am Fr., 12. März 2021 um 21:54 Uhr schrieb zadam @.***

:

Actually tar was used as an export format previously. And it sucked a lot, especially with unicode. So not getting back there.

Since I belive the actual ZIP files are not corrupted (they unzip just fine on Linux), there should be some way (some other unarchiver) to unzip them correctly in windows too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zadam/trilium/issues/1734#issuecomment-797749283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACADLW5DMJJYRSA277OVJGDTDJ5QZANCNFSM4Y7UWSCA .

zadam commented 2 years ago

ZIP issues have been fixed a while ago.