Skip to content

Commit

Permalink
Fix identify running Aseprite processes correctly to recover crashed …
Browse files Browse the repository at this point in the history
…sessions (related to aseprite#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.
  • Loading branch information
Gasparoken committed Feb 15, 2024
1 parent 14696de commit 243982a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/app/crash/session.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 243982a

Please sign in to comment.