mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 08:38:39 +02:00
Fix Audacity failing silently on new instance
Should now behave the same on Linux as on Windows.
This commit is contained in:
parent
0248c870b2
commit
837d5e18f3
@ -1903,14 +1903,22 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
||||
sock->Connect(addr, true);
|
||||
if (sock->IsConnected())
|
||||
{
|
||||
for (size_t i = 0, cnt = parser->GetParamCount(); i < cnt; i++)
|
||||
if (parser->GetParamCount() > 0)
|
||||
{
|
||||
// Send the filename
|
||||
wxString param = parser->GetParam(i);
|
||||
sock->WriteMsg((const wxChar *) param, (param.Len() + 1) * sizeof(wxChar));
|
||||
for (size_t i = 0, cnt = parser->GetParamCount(); i < cnt; i++)
|
||||
{
|
||||
// Send the filename
|
||||
wxString param = parser->GetParam(i);
|
||||
sock->WriteMsg((const wxChar *) param, (param.Len() + 1) * sizeof(wxChar));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Send an empty string to force existing Audacity to front
|
||||
sock->WriteMsg(wxEmptyString, sizeof(wxChar));
|
||||
}
|
||||
|
||||
return false;
|
||||
return sock->Error();
|
||||
}
|
||||
|
||||
wxMilliSleep(100);
|
||||
|
Loading…
x
Reference in New Issue
Block a user