diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-19 11:16:24 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-19 11:16:24 +0000 |
commit | 37115a224e9f1cfecc5db37285885fe8b2d60964 (patch) | |
tree | 2fcd65181dfc2e65b9c74eb65f37c7be3481e307 /tools | |
parent | 2a5e4b7c74d116fa743da9f6482c16711b2d2dd6 (diff) | |
download | Mana-37115a224e9f1cfecc5db37285885fe8b2d60964.tar.gz Mana-37115a224e9f1cfecc5db37285885fe8b2d60964.tar.bz2 Mana-37115a224e9f1cfecc5db37285885fe8b2d60964.tar.xz Mana-37115a224e9f1cfecc5db37285885fe8b2d60964.zip |
Fixed weird problem with zip_open failing with relative path.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/upalyzer/analyze.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/upalyzer/analyze.php b/tools/upalyzer/analyze.php index ff2b365c..d2f8cb2a 100644 --- a/tools/upalyzer/analyze.php +++ b/tools/upalyzer/analyze.php @@ -56,9 +56,9 @@ foreach ($update_file as $update_line) $update_file_maxlen = max($update_file_maxlen, strlen($file)); $entries = array(); - $zip = zip_open($file); + $zip = zip_open(realpath($file)); - if ($zip) { + if ($zip && !is_int($zip)) { while ($zip_entry = zip_read($zip)) { $update['uncompressed_size'] += zip_entry_filesize($zip_entry); $entry_name = zip_entry_name($zip_entry); @@ -81,7 +81,7 @@ foreach ($update_file as $update_line) zip_close($zip); } else { - $update['zip_error'] = true; + $update['zip_error'] = $zip or true; } ksort($entries); @@ -116,7 +116,9 @@ foreach (array_reverse($updates) as $update) $update['used_entry_count'], count($update['entries'])); } else { - printf(" Error!"); + printf(" Error! "); + if (is_int($update['zip_error'])) + echo $update['zip_error']; } echo "\n"; } |