Skip to content

Commit

Permalink
Revert "Fix RecordNode disk space warning behavior"
Browse files Browse the repository at this point in the history
This reverts commit 43507b0.
  • Loading branch information
medengineer committed Nov 28, 2023
1 parent 579ba4e commit cbcbd60
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Source/Processors/RecordNode/RecordNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void RecordNode::parameterValueChanged(Parameter* p)

void RecordNode::checkDiskSpace()
{
float diskSpaceWarningThreshold = 95; //GB
float diskSpaceWarningThreshold = 5; //GB

File dataDir(dataDirectory);
int64 freeSpace = dataDir.getBytesFreeOnVolume();
Expand All @@ -167,14 +167,9 @@ void RecordNode::checkDiskSpace()

if (availableBytes < diskSpaceWarningThreshold && !isRecording)
{
if (directoryChangedSinceLastWarning)
{
String msg = "Less than " + String(int(diskSpaceWarningThreshold)) + " GB of disk space available in " + String(dataDirectory.getFullPathName());
msg += ". Recording may fail. Please free up space or change the recording directory.";
AlertWindow::showMessageBoxAsync(AlertWindow::WarningIcon, "WARNING", msg);

directoryChangedSinceLastWarning = false;
}
String msg = "Less than " + String(int(diskSpaceWarningThreshold)) + " GB of disk space available in " + String(dataDirectory.getFullPathName());
msg += ". Recording may fail. Please free up space or change the recording directory.";
AlertWindow::showMessageBoxAsync(AlertWindow::WarningIcon, "WARNING", msg);
}
}

Expand Down Expand Up @@ -399,8 +394,6 @@ void RecordNode::setDataDirectory(File directory)
dataDirectory = directory;
newDirectoryNeeded = true;

directoryChangedSinceLastWarning = true;

checkDiskSpace();
}

Expand Down

0 comments on commit cbcbd60

Please sign in to comment.