From 53e32b598652e05d8a98bf123d8b9a3a514f126d Mon Sep 17 00:00:00 2001 From: Tom van der Woerdt Date: Wed, 17 Jul 2013 19:12:00 +0200 Subject: [PATCH] Fix the size prediction for files where (size%512==0) --- src/_h5ai/server/php/inc/Archive.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_h5ai/server/php/inc/Archive.php b/src/_h5ai/server/php/inc/Archive.php index d253aeda..adc1d263 100644 --- a/src/_h5ai/server/php/inc/Archive.php +++ b/src/_h5ai/server/php/inc/Archive.php @@ -96,7 +96,8 @@ class Archive { $size = filesize($file); $filesizes[$file] = $size; - $total_size += 512 + $size + (512 - ($size % 512)); + $total_size += 512 + $size; + if ($size % 512 != 0) $total_size += 512 - ($size % 512); }