Skip to content

Commit ba8c8b2

Browse files
committed
Fail if either disk space check fails
Rather than both. Introduced in 386a6b6
1 parent 1973257 commit ba8c8b2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/init.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,14 @@ bool AppInitMain(InitInterfaces& interfaces)
16311631

16321632
// ********************************************************* Step 11: import blocks
16331633

1634-
if (!CheckDiskSpace() && !CheckDiskSpace(0, true))
1634+
if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ false)) {
1635+
InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir()));
16351636
return false;
1637+
}
1638+
if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ true)) {
1639+
InitError(strprintf(_("Error: Disk space is low for %s"), GetBlocksDir()));
1640+
return false;
1641+
}
16361642

16371643
// Either install a handler to notify us when genesis activates, or set fHaveGenesis directly.
16381644
// No locking, as this happens before any background thread is started.

0 commit comments

Comments
 (0)