mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] DataLog: Stop logging if insufficient free space (#5699)
The threshold is set to 5 MB.
This commit is contained in:
@@ -111,7 +111,7 @@ Thread::~Thread() {
|
||||
void Thread::Main() {
|
||||
// based on free disk space, scan for "old" FRC_*.wpilog files and remove
|
||||
{
|
||||
uintmax_t freeSpace = fs::space(m_logDir).free;
|
||||
uintmax_t freeSpace = fs::space(m_logDir).available;
|
||||
if (freeSpace < kFreeSpaceThreshold) {
|
||||
// Delete oldest FRC_*.wpilog files (ignore FRC_TBD_*.wpilog as we just
|
||||
// created one)
|
||||
|
||||
Reference in New Issue
Block a user