fix: do not return negative quotas

This commit is contained in:
2026-07-11 21:13:48 +02:00
parent e5c985fe00
commit 6e8391545b

View File

@@ -87,7 +87,12 @@ get_total_quota_until_today(){
} }
get_remaining_quota(){ get_remaining_quota(){
echo -n $(($(get_total_quota_until_today) - $(get_current_used_bytes))) local remaining_quota=$(($(get_total_quota_until_today) - $(get_current_used_bytes)))
if [ $remaining_quota -lt 0 ]; then
echo 0
else
echo -n $remaining_quota
fi
} }
show_remaining_quota(){ show_remaining_quota(){