diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index e22a8a4b8822abb8e4b5dae6e2d6d4db458afd6e..630bfe92bc16d4c06524d6331de58e1c68be5a0b 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -594,7 +594,11 @@ class ap_manage { require_once(DOKU_PLUGIN."plugin/inc/tarlib.class.php"); - $tar = new CompTar($file, COMPRESS_DETECT); + if (strpos($ext, 'bz') !== false) $compress_type = COMPRESS_BZIP; + else if (strpos($ext,'gz') !== false) $compress_type = COMPRESS_GZIP; + else $compress_type = COMPRESS_NONE; + + $tar = new CompTar($file, $compress_type); $ok = $tar->Extract(FULL_ARCHIVE, $target, '', 0777); // FIXME sort something out for handling tar error messages meaningfully