Merge branch 'dk_instances' into master

This commit is contained in:
David Kocik 2020-10-14 09:40:54 +02:00
commit d7686d7e6a

View File

@ -254,7 +254,7 @@ bool instance_check(int argc, char** argv, bool app_config_single_instance)
GUI::wxGetApp().init_single_instance_checker(lock_name + ".lock", data_dir() + "/cache/"); GUI::wxGetApp().init_single_instance_checker(lock_name + ".lock", data_dir() + "/cache/");
if (cla.should_send.value() && GUI::wxGetApp().single_instance_checker()->IsAnotherRunning()) { if (cla.should_send.value() && GUI::wxGetApp().single_instance_checker()->IsAnotherRunning()) {
#else // mac & linx #else // mac & linx
if (cla.should_send.value() && instance_check_internal::get_lock(lock_name + ".lock", data_dir() + "/cache/")) { if (*cla.should_send && instance_check_internal::get_lock(lock_name + ".lock", data_dir() + "/cache/")) {
#endif #endif
instance_check_internal::send_message(cla.cl_string, lock_name); instance_check_internal::send_message(cla.cl_string, lock_name);
BOOST_LOG_TRIVIAL(info) << "instance check: Another instance found. This instance will terminate."; BOOST_LOG_TRIVIAL(info) << "instance check: Another instance found. This instance will terminate.";