Skip to content

Commit f408aa2

Browse files
committed
Update recording directory validation in ProcessorGraph and DiskSpaceChecker
1 parent 07dc72b commit f408aa2

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

Source/Processors/ProcessorGraph/ProcessorGraph.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,8 +1115,12 @@ bool ProcessorGraph::allRecordNodeDirectoriesAreValid()
11151115
if (p->isRecordNode())
11161116
{
11171117
auto* pathParam = p->getParameter ("directory");
1118-
if (pathParam != nullptr && ! pathParam->isValid())
1119-
return false;
1118+
if (pathParam != nullptr)
1119+
{
1120+
bool isDefaultAndInvalid = (pathParam->getValue().toString() == "None" && ! CoreServices::getRecordingParentDirectory().exists());
1121+
if (! pathParam->isValid() || isDefaultAndInvalid)
1122+
return false;
1123+
}
11201124
}
11211125
}
11221126
return true;

Source/Processors/RecordNode/DiskMonitor/DiskSpaceChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void DiskSpaceChecker::timerCallback()
6767

6868
void DiskSpaceChecker::checkDirectoryAndDiskSpace()
6969
{
70-
if (! recordNode->getParameter ("directory")->isValid())
70+
if (! recordNode->getDataDirectory().exists())
7171
{
7272
recordNode->getParameter ("directory")->valueChanged();
7373
notifyDirectoryInvalid();

Source/Processors/RecordNode/RecordNodeEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void DiskMonitor::directoryInvalid (bool recordingStopped)
208208
if (recordingStopped)
209209
{
210210
String msg = "Record Node (" + String (processor->getNodeId()) + ") - The selected recording path doesn't exist anymore.";
211-
msg += "\n\nPlease select a valid directory in the Record Node editor and restart the recording.";
211+
msg += "\n\nPlease select a valid directory and restart the recording.";
212212
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Recording Stopped", msg);
213213
}
214214
}

0 commit comments

Comments
 (0)