Fix identify running Aseprite processes correctly to recover crashed sessions (related to #4130)

Prior to this fix, Aseprite was hiding some sessions to recover,
resulting in additional support for users.
To display available recovery sessions, Aseprite only checked if
the session belonged to any running process on the OS via the
'pid' number.
This commit is contained in:
Gaspar Capello 2024-02-15 12:10:09 -03:00
parent 14696de980
commit 243982ab78

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2019-2023 Igara Studio S.A.
// Copyright (C) 2019-2024 Igara Studio S.A.
// Copyright (C) 2001-2018 David Capello
//
// This program is distributed under the terms of
@ -127,10 +127,8 @@ const Session::Backups& Session::backups()
bool Session::isRunning()
{
loadPid();
if (m_pid)
return base::is_process_running(m_pid);
else
return false;
return base::get_process_name(m_pid) ==
base::get_process_name(base::get_current_process_id());
}
bool Session::isCrashedSession()