Don't silently drop working directory, print error if it doesn't exist

This commit is contained in:
baldurk
2025-05-05 10:49:01 +01:00
parent f9c1ae7944
commit 9673a5571c
+9 -8
View File
@@ -1221,17 +1221,18 @@ void CaptureDialog::TriggerCapture()
}
}
QString workingDir;
QString workingDir = ui->workDirPath->text();
// for non-remote captures, check the directory locally
if(m_Ctx.Replay().CurrentRemote().IsValid())
if(!m_Ctx.Replay().CurrentRemote().IsValid())
{
workingDir = ui->workDirPath->text();
}
else
{
if(QDir(ui->workDirPath->text()).exists())
workingDir = ui->workDirPath->text();
if(!QDir(ui->workDirPath->text()).exists())
{
RDDialog::critical(
this, tr("Invalid working directory"),
tr("Invalid working directory: %1\nThis path does not exist").arg(workingDir));
return;
}
}
QString cmdLine = GetCommandLine();