RebexZip does not add directory entries to the zip archive, is there a way I can force these to be added?
Rebexzip zip entries (2):
root.txt
a/file in directory a.txt
Winzip / Winrar zip entries (3):
root.txt
a/
a/file in directory a.txt
In this case "a/" is missing from rebex archive, causing a 3rd parties unzip function to fail. (they use java)
Code I am using to read the zip entries: http://www.roseindia.net/tutorial/java/corejava/zip/ShowEntries.html
This code also doesnt show directory:
http://www.java-examples.com/determine-if-zip-entry-directory-example
==== Additional details to replicate
using (ZipArchive zip = new ZipArchive(@"E:\\rebex3.zip"))
{
// This line is not calling 'CreateDirectory' internally for directories
zip.Add(@"E:\z\*", @"\", Rebex.IO.TraversalMode.Recursive);
// Manually adding directory & adding a file add the correct entries
zip.CreateDirectory(@"\test");
zip.AddFile(@"E:\temp\x.pdf", @"\test\x.pdf");
}
produces the following entries output (note missing "a/")
root.txt
a/file in directory a.txt
test/
test/x.pdf
===========
Will you fix this or should I simply write my own method for adding directories to a zip archive recursively?