Skip to content

Commit 420a983

Browse files
committed
Bugfix: GUI/Intro: Disable GUI prune option if -prune is set, regardless of set value
1 parent bbbf89a commit 420a983

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
@@ -141,8 +141,8 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si
141141

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

0 commit comments

Comments
 (0)