From 420a983e25d2f3ac3cc4d537bf223682be651604 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 30 Aug 2022 18:54:46 +0000 Subject: [PATCH] Bugfix: GUI/Intro: Disable GUI prune option if -prune is set, regardless of set value --- src/qt/intro.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 6423e457aa..bb03899f07 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -141,8 +141,8 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si const int min_prune_target_GB = std::ceil(MIN_DISK_SPACE_FOR_BLOCK_FILES / 1e9); ui->pruneGB->setRange(min_prune_target_GB, std::numeric_limits::max()); - if (gArgs.GetIntArg("-prune", 0) > 1) { // -prune=1 means enabled, above that it's a size in MiB - ui->prune->setChecked(true); + if (gArgs.IsArgSet("-prune")) { + ui->prune->setChecked(gArgs.GetIntArg("-prune", 0) >= 1); ui->prune->setEnabled(false); } ui->pruneGB->setValue(m_prune_target_gb);