Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 1a9911452e097acc0b3400ba724a84e2079e568f 1 parent 736db01
authored October 17, 2004

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  lib/pclzip/pclzip.lib.php
7  lib/pclzip/pclzip.lib.php
@@ -2280,6 +2280,13 @@ function privAddFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remo
2280 2280
     }
2281 2281
     */
2282 2282
 
  2283
+    //skodak's hack - store trailing slash for directories - for compatibility with info-zip
  2284
+    if(is_dir($p_filename)) {
  2285
+      if(strrpos($v_stored_filename, '/') != strlen($v_stored_filename)-1) {
  2286
+        $v_stored_filename = $v_stored_filename.'/';
  2287
+      }
  2288
+    }
  2289
+
2283 2290
     // ----- Set the file properties
2284 2291
     clearstatcache();
2285 2292
     $p_header['version'] = 20;

0 notes on commit 1a99114

Please sign in to comment.
Something went wrong with that request. Please try again.