From 87995812196db5bcb7667bc1256b5a4e1ca91a5f Mon Sep 17 00:00:00 2001 From: "Zane C. Bowers-Hadley" Date: Mon, 25 Nov 2024 03:36:01 -0600 Subject: [PATCH] ensure quota will always be present for a total for nextcloud (#557) --- snmp/nextcloud | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snmp/nextcloud b/snmp/nextcloud index df670b50f..37fdddd70 100644 --- a/snmp/nextcloud +++ b/snmp/nextcloud @@ -128,6 +128,7 @@ $tojson{encryption_enabled} = 0; $tojson{calendars} = 0; $tojson{multimount} = 0; $tojson{users} = {}; +$tojson{quota} = 0; # current user my $current_user = $ENV{LOGNAME} || $ENV{USER} || getpwuid($<); @@ -246,9 +247,9 @@ foreach my $user (@users) { 'last_seen_string' => $user_info->{last_seen}, 'calendars' => 0, }; - $tojson{free} = $user_info->{storage}{free}; + $tojson{free} = $user_info->{storage}{free}; $tojson{total} = $user_info->{storage}{total}; - $tojson{used} = $tojson{used} + $user_info->{storage}{used}; + $tojson{used} = $tojson{used} + $user_info->{storage}{used}; if ( $user_info->{storage}{quota} > 0 ) { $tojson{quota} = $tojson{quota} + $user_info->{storage}{quota}; }