File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -1272,9 +1272,30 @@ void ControlPanel::setSelectedRecordEngine (int index)
12721272
12731273void ControlPanel::filenameComponentChanged (FilenameComponent* fnComponent)
12741274{
1275- for (auto recNode : AccessClass::getProcessorGraph ()->getRecordNodes ())
1275+ File currentFile = fnComponent->getCurrentFile ();
1276+
1277+ if (! currentFile.exists ())
12761278 {
1277- recNode->setDefaultRecordingDirectory (fnComponent->getCurrentFile ());
1279+ StringArray fileNames = fnComponent->getRecentlyUsedFilenames ();
1280+ fileNames.removeString (currentFile.getFullPathName (), true );
1281+ fnComponent->setCurrentFile (CoreServices::getDefaultUserSaveDirectory (), true , dontSendNotification);
1282+ fnComponent->setRecentlyUsedFilenames (fileNames);
1283+
1284+ if (! isConsoleApp)
1285+ {
1286+ AccessClass::getUIComponent ()->showBubbleMessage (fnComponent,
1287+ " The selected recording directory does not exist. "
1288+ " Setting the parent recording directory to the default user save directory." );
1289+ }
1290+
1291+ return ;
1292+ }
1293+ else
1294+ {
1295+ for (auto recNode : AccessClass::getProcessorGraph ()->getRecordNodes ())
1296+ {
1297+ recNode->setDefaultRecordingDirectory (currentFile);
1298+ }
12781299 }
12791300}
12801301
You can’t perform that action at this time.
0 commit comments