Fail if either disk space check fails
Rather than both.
Introduced in 386a6b62a8
This commit is contained in:
parent
1973257da0
commit
ba8c8b2227
1 changed files with 7 additions and 1 deletions
|
@ -1631,8 +1631,14 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||||
|
|
||||||
// ********************************************************* Step 11: import blocks
|
// ********************************************************* Step 11: import blocks
|
||||||
|
|
||||||
if (!CheckDiskSpace() && !CheckDiskSpace(0, true))
|
if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ false)) {
|
||||||
|
InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir()));
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ true)) {
|
||||||
|
InitError(strprintf(_("Error: Disk space is low for %s"), GetBlocksDir()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Either install a handler to notify us when genesis activates, or set fHaveGenesis directly.
|
// Either install a handler to notify us when genesis activates, or set fHaveGenesis directly.
|
||||||
// No locking, as this happens before any background thread is started.
|
// No locking, as this happens before any background thread is started.
|
||||||
|
|
Loading…
Reference in a new issue