michaeluno / admin-page-framework

Facilitates WordPress plugin and theme development.
http://admin-page-framework.michaeluno.jp/
Other
337 stars 71 forks source link

Empty generated ZIP #235

Closed szepeviktor closed 8 years ago

szepeviktor commented 8 years ago

WIth version 3.7.11 and vanilla WP I get an ZIP with an empyt "" named folder. us-unlocked-admin-page-framework.3.7.11-3.zip

szepeviktor commented 8 years ago

Only 7-Zip opens it.

michaeluno commented 8 years ago

I could confirm the problem. It seems it only occurs on Windows. Thanks for the report.

The AdminPageFramework_Zip class (https://github.com/michaeluno/admin-page-framework/blob/3.7.11/development/utility/zip/AdminPageFramework_Zip.php#L24-L405) is used to generate a zip file. Would be appreciated if you could play around with the class and create a zip file in your environment to see if you can open it.

Usage:

$_oZip = new AdminPageFramework_Zip( $sSourcePath, $sDestinationPath );
$_bSucceed = $_oZip->compress();

Duplicate: #234

szepeviktor commented 8 years ago

WP has PclZip built in. Could you use that?

michaeluno commented 8 years ago

Sounds like a good option.

If you have a chance to see if it can be used instead of the framework zip utility class, you want to modify this class method, _getDownloadFrameworkZipFile() ( https://github.com/michaeluno/admin-page-framework/blob/3.7.11/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php#L263-L287).

szepeviktor commented 8 years ago

PclZip in much simpler but please consider using it because it is a WP built-in class.

michaeluno commented 8 years ago

I'm going to leave it as it works now. Not sure in what sense it is simpler but if you are interested, you are always welcome to suggest better code. The class method to modify is mentioned in the previous reply.