mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-25 10:43:46 +00:00
Sort data recovery sessions by date/time
This commit is contained in:
parent
42b8d04e46
commit
afd71377f9
@ -16,6 +16,8 @@
|
|||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
#include "base/time.h"
|
#include "base/time.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace app {
|
namespace app {
|
||||||
namespace crash {
|
namespace crash {
|
||||||
|
|
||||||
@ -50,6 +52,12 @@ DataRecovery::DataRecovery(doc::Context* ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort sessions from the most recent one to the oldest one
|
||||||
|
std::sort(m_sessions.begin(), m_sessions.end(),
|
||||||
|
[](const SessionPtr& a, const SessionPtr& b) {
|
||||||
|
return a->name() > b->name();
|
||||||
|
});
|
||||||
|
|
||||||
// Create a new session
|
// Create a new session
|
||||||
base::pid pid = base::get_current_process_id();
|
base::pid pid = base::get_current_process_id();
|
||||||
std::string newSessionDir;
|
std::string newSessionDir;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user