jaime-olivares / zipstorer

A Pure C# Class to Store Files in Zip
MIT License
183 stars 63 forks source link

Suggestion for the extraction routine in the ZipStorer class demo #9

Closed KrayziePK closed 7 years ago

KrayziePK commented 7 years ago

The extract routine in the demo class does not work properly with the internal directory structure of the zip file. I tried extracting a zip file containing multiple shape files. The shape file were organized by folders, each folder containing shape files with the same name. When I ran the demo extraction I ended up with only one set of the shape files in a single folder (the other sets were overwritten by newer files of the same name). Basically, my suggestion is that the following line

path = Path.Combine(TextTargetFolder.Text, Path.GetFileName(entry.FilenameInZip));

is changed to

path = Path.Combine(TextTargetFolder.Text, entry.FilenameInZip);

to preserve the internal zip directory structure.

jaime-olivares commented 7 years ago

Included the suggested change in the last version