forked from Silverfish/proton-bridge
fix(GODT-2596): fix bug when trying to generate Sentry report and there is not log.
This commit is contained in:
@ -43,7 +43,12 @@ QString latestBridgeLogPath() {
|
||||
if (logsDir.isEmpty()) {
|
||||
return QString();
|
||||
}
|
||||
|
||||
QFileInfoList files = logsDir.entryInfoList({ "v*.log" }, QDir::Files); // could do sorting, but only by last modification time. we want to sort by creation time.
|
||||
if (files.isEmpty()) {
|
||||
return QString();
|
||||
}
|
||||
|
||||
std::sort(files.begin(), files.end(), [](QFileInfo const &lhs, QFileInfo const &rhs) -> bool {
|
||||
return lhs.birthTime() < rhs.birthTime();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user