Skip to content

Commit

Permalink
ncp-web: fix display of big files for 32 bit
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <[email protected]>
  • Loading branch information
nachoparker committed May 13, 2021
1 parent 0ee3aa9 commit 8d76a6b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
16 changes: 14 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@

[v1.34.7](https://github.com/nextcloud/nextcloudpi/commit/0cce679) (2021-01-19) docker: fix datadir path contents
[v1.35.2](https://github.com/nextcloud/nextcloudpi/commit/3f345eb) (2021-04-29) ncp-web: fix display of big files for 32 bit

[v1.34.6](https://github.com/nextcloud/nextcloudpi/commit/84ccf94) (2021-01-18) docker: fix datadir path
[v1.35.1 ](https://github.com/nextcloud/nextcloudpi/commit/e64ca34) (2021-04-29) ncp-web: fix backup download for big files in 32-bit

[v1.35.0](https://github.com/nextcloud/nextcloudpi/commit/be30663) (2021-02-27) upgrade to NC20.0.8

[v1.34.9 ](https://github.com/nextcloud/nextcloudpi/commit/7d15924) (2021-01-19) nc-autoupdate-ncp: Append to log instead of replace

[v1.34.8 ](https://github.com/nextcloud/nextcloudpi/commit/117b8ea) (2021-01-20) nc-automount: udiskie verbose output

[v1.34.7, master](https://github.com/nextcloud/nextcloudpi/commit/b978184) (2021-01-19) docker: fix datadir path contents

[v1.34.6 ](https://github.com/nextcloud/nextcloudpi/commit/84ccf94) (2021-01-18) docker: fix datadir path

[v1.34.5 ](https://github.com/nextcloud/nextcloudpi/commit/afa39fb) (2021-01-18) ncp-config: shorten descriptions

Expand Down Expand Up @@ -35,6 +45,8 @@

[v1.29.8 ](https://github.com/nextcloud/nextcloudpi/commit/21a791d) (2020-08-30) nc-limits: minimum 6 PHP threads (for NC talk)

[v1.29.7 ](https://github.com/nextcloud/nextcloudpi/commit/c143acc) (2020-07-24) do not hsts preload by default, only serve hsts header over https

[v1.29.6 ](https://github.com/nextcloud/nextcloudpi/commit/14b78e3) (2020-08-29) ncp-web: Fix the style of the language selection dropdown (chrome)

[v1.29.5 ](https://github.com/nextcloud/nextcloudpi/commit/34e84ba) (2020-08-30) ncp-web: fix initial screen displaying all sections
Expand Down
10 changes: 9 additions & 1 deletion ncp-web/backups.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
$bkps = array();
$bkps_auto = array();

function filesize_compat($file)
{
if(PHP_INT_SIZE === 4) # workaround for 32-bit architectures
return trim(shell_exec("stat -c%s " . escapeshellarg($file)));
else
return filesize($file);
}

if (file_exists($bkp_dir))
{
$bkps = array_diff(scandir($bkp_dir), array('.', '..'));
Expand Down Expand Up @@ -60,7 +68,7 @@
$compressed = '';

$date = date("Y M d @ H:i", filemtime($bkp));
$size = round(filesize($bkp)/1024/1024) . " MiB";
$size = round(filesize_compat($bkp)/1024/1024) . " MiB";

$has_data = '';
$ret = null;
Expand Down

0 comments on commit 8d76a6b

Please sign in to comment.