Skip to content

Commit

Permalink
Logger: fixing log file pruning order
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jun 13, 2024
1 parent fcf5a27 commit 5a7b118
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ namespace chowdsp
{
namespace LogFileHelpers
{
struct LogFileComparator
{
static int compareElements (juce::File first, juce::File second) // NOLINT(performance-unnecessary-value-param): JUCE sort needs copies for some reason
{
const auto firstTime = first.getLastModificationTime().toMilliseconds();
const auto secondTime = second.getLastModificationTime().toMilliseconds();

return firstTime < secondTime;
}
};

FileArray getLogFilesSorted (const LogFileParams& params)
{
const juce::String logFileWildcard = "*" + params.logFileExtension;
Expand All @@ -39,7 +28,7 @@ namespace LogFileHelpers
{
const auto lhsTime = lhs.getLastModificationTime().toMilliseconds();
const auto rhsTime = rhs.getLastModificationTime().toMilliseconds();
return lhsTime < rhsTime;
return lhsTime > rhsTime;
});
}

Expand Down

0 comments on commit 5a7b118

Please sign in to comment.