From 5b19d5d29e00975515a922b2470a5ab757feb3ba Mon Sep 17 00:00:00 2001 From: shuki Date: Wed, 4 Mar 2026 19:26:29 +0200 Subject: [PATCH] Fix empty retention count display on remotes list page Fall back to default '30' when RETENTION_COUNT is set to empty string, not just when the key is missing from the config. Co-Authored-By: Claude Opus 4.6 --- whm/gniza-whm/remotes.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whm/gniza-whm/remotes.cgi b/whm/gniza-whm/remotes.cgi index c839430..a48a52e 100644 --- a/whm/gniza-whm/remotes.cgi +++ b/whm/gniza-whm/remotes.cgi @@ -148,7 +148,8 @@ sub handle_list { my $conf = GnizaWHM::Config::parse(GnizaWHM::UI::remote_conf_path($name), 'remote'); my $esc_name = GnizaWHM::UI::esc($name); my $type = $conf->{REMOTE_TYPE} // 'ssh'; - my $retention = GnizaWHM::UI::esc($conf->{RETENTION_COUNT} // '30'); + my $retention_raw = $conf->{RETENTION_COUNT} // ''; + my $retention = GnizaWHM::UI::esc($retention_raw ne '' ? $retention_raw : '30'); my ($type_label, $dest); if ($type eq 's3') {