brendan-duncan / archive

Dart library to encode and decode various archive and compression formats, such as Zip, Tar, GZip, ZLib, and BZip2.
MIT License
399 stars 139 forks source link

Version 3.3.8 corrupts symlinked files when extracting #278

Closed Elleo closed 12 months ago

Elleo commented 1 year ago

Hi,

After upgrading to version 3.3.8 of the package I found that any tar file containing symlinks results in corrupted output of the file being symlinked to. I've attached an example file test.tar.gz (Gzip compression isn't required to demonstrate this behaviour, but github won't accept plain tar files as attachments) which contains two files:

output-3.3.7.tar.gz output-3.3.8.tar.gz

Thanks!

brendan-duncan commented 1 year ago

That sounds bad. I'll take a look.

brendan-duncan commented 1 year ago

I believe I have it fixed. It was closing the input file before it finished extracting the files. The fix is in github, I'll publish as soon as I can take a look at some other issues.

Elleo commented 1 year ago

Brilliant, thanks for looking at this so quickly!

brendan-duncan commented 12 months ago

I pushed out the fix in 3.3.9 because I'm not sure how long it will take to look at the other things I was going to do.

Elleo commented 12 months ago

Great, I've just tested with my application and everything is working correctly again; thanks very much!