Skip to content

Commit 501ead3

Browse files
committed
Bugfix: GUI/Intro: Disable GUI prune option if -prune is set, regardless of set value
1 parent 52dcb1d commit 501ead3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/intro.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si
142142

143143
const int min_prune_target_GB = std::ceil(MIN_DISK_SPACE_FOR_BLOCK_FILES / 1e9);
144144
ui->pruneGB->setRange(min_prune_target_GB, std::numeric_limits<int>::max());
145-
if (gArgs.GetIntArg("-prune", 0) > 1) { // -prune=1 means enabled, above that it's a size in MiB
146-
ui->prune->setChecked(true);
145+
if (gArgs.IsArgSet("-prune")) {
146+
ui->prune->setChecked(gArgs.GetIntArg("-prune", 0) >= 1);
147147
ui->prune->setEnabled(false);
148148
}
149149
ui->pruneGB->setValue(m_prune_target_gb);

0 commit comments

Comments
 (0)