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).

Merged from MOODLE_14_STABLE
This commit is contained in:
stronk7 2004-10-17 13:36:13 +00:00
parent 193ba8e7c4
commit e941292002

View file

@ -2280,6 +2280,13 @@
} }
*/ */
//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 // ----- Set the file properties
clearstatcache(); clearstatcache();
$p_header['version'] = 20; $p_header['version'] = 20;