1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

Bug 2052 - Mac: Lock file prevents launching Audacity

This ameliorates the problem, by prompting the user telling them the lock file
location.  It does not fully solve it, but should allow us to reduce the bug to P2.
This commit is contained in:
James Crook 2019-10-03 17:17:41 +01:00
parent dec07d43e5
commit 98f495a485

View File

@ -1897,9 +1897,26 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
_("Use the New or Open commands in the currently running Audacity\nprocess to open multiple projects simultaneously.\n");
AudacityMessageBox(prompt, _("Audacity is already running"),
wxOK | wxICON_ERROR);
#ifdef __WXMAC__
// Bug 2052
// On mac, the lock file may persist and stop Audacity starting properly.
wxString lockFileName = dir + "/" + name;
int action = AudacityMessageBox(wxString::Format( _("If you're sure another copy of Audacity isn't running, Audacity\ncan skip the test for 'Audacity already running' next time\nby removing the lock file:\n\n%s\n\nDo you want to do that?"),
lockFileName
),
_("Possible Lock File Problem"),
wxYES_NO | wxICON_EXCLAMATION,
NULL);
if (action == wxYES){
::wxRemoveFile( lockFileName );
}
#endif
return false;
}
#if defined(__WXMSW__)
// Create the DDE IPC server
mIPCServ = std::make_unique<IPCServ>(IPC_APPL);