Permalink
Browse files

Now pclzip generated files are compatible with info-zip

(linux, macos x, win32, bsd...) based extractors. This
include command-line flavours, stuffit and so on...

Thanks to Petr!!

We have to remember to apply this patch when we update the
pclzip in th future (if their authors don't include it).
  • Loading branch information...
stronk7
stronk7 committed Oct 17, 2004
1 parent 736db01 commit 1a9911452e097acc0b3400ba724a84e2079e568f
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/pclzip/pclzip.lib.php
@@ -2280,6 +2280,13 @@ function privAddFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remo
}
*/
+ //skodak's hack - store trailing slash for directories - for compatibility with info-zip
+ if(is_dir($p_filename)) {
+ if(strrpos($v_stored_filename, '/') != strlen($v_stored_filename)-1) {
+ $v_stored_filename = $v_stored_filename.'/';
+ }
+ }
+
// ----- Set the file properties
clearstatcache();
$p_header['version'] = 20;

0 comments on commit 1a99114

Please sign in to comment.