Overview
Features
Download
Documentation
Community
Add-Ons & Services

Bug in Zip::Compress in 1.5.2

Please post support and help requests here.

Bug in Zip::Compress in 1.5.2

Postby dedvalson » 07 Jul 2014, 19:34

Hi,

The following code produces an invalid zipfile in 1.5.2 (I have not yet tried 1.5.3 but I don't see any changes that should affect this).

Code: Select all
     
            // MUST use binary!
            std::ofstream out("c:\\data\\test.zip", std::ios::binary);
            Compress c(out, false);
            Poco::Path aFile("c:\\data\\hello.txt");
            c.addFile(aFile, "hello.txt");
            c.close(); // MUST be done to finalize the Zip file


With the false in the compress constructor changed to true, it works properly:

Code: Select all
           
            // MUST use binary!
            std::ofstream out("c:\\data\\test.zip", std::ios::binary);
            Compress c(out, true);
            Poco::Path aFile("c:\\data\\hello.txt");
            c.addFile(aFile, "hello.txt");
            c.close(); // MUST be done to finalize the Zip file
dedvalson
 
Posts: 9
Joined: 27 Feb 2014, 19:57

Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests