* * *

Author Topic: [Solve]TZipper in .zip created under Windows no folders if extracted under Linux  (Read 1946 times)

d3im

  • Newbie
  • Posts: 3
Hi,

I have problem while using Lazarus IDE v1.4.4 FPC 2.6.4 with TZipper.
When I add files (even in folder)  to zip and it zips these files, on Windows it unzips fine (even 7zip in test writes 0 folders).
Under Linux this zip is unzipped without folders, just files.

Is there any chance to zip files/folders with TZipper and unzip it on Linux flawlessly?
I looked into zip files to find differences and found the correct one zip file has folders as independent entries.

Thanks in advance
« Last Edit: February 09, 2016, 12:00:35 pm by d3im »

d3im

  • Newbie
  • Posts: 3
Re: TZipper in .zip created under Windows no folders if extracted under Linux
« Reply #1 on: February 08, 2016, 11:25:27 am »
I found another usable component - Abbrevia. Could it make "correct" .zip files? Should I give it a try or not?
Thanks  :)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5875
Re: TZipper in .zip created under Windows no folders if extracted under Linux
« Reply #2 on: February 08, 2016, 11:46:17 am »
There are many zip formats. A 64-bit filesize extension was added only in FPC 3.0.

The best would be to try find out (unix "file" command and unzip) how the file looks.

It could be that you add files with a backward slash instead of the regimented forward slahs, which is somewhat ok on Windows, but not on *nix.

d3im

  • Newbie
  • Posts: 3
Re: TZipper in .zip created under Windows no folders if extracted under Linux
« Reply #3 on: February 08, 2016, 04:03:24 pm »
Seems to be solved now (I'll mark it solved after my main program will be updated and everything about zip worked).
I just changed \ to / in path inside zip (the second parameter of AddFileEntry method) and it seems to unzip under *nix well.

I could say I've tried the same before right inside main program and it didn't worked... But it may be my mistake  :)

Anyway thank you...

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus