Merge pull request #3799 from bernarden/feature/sorting-logs-in-decreasing-order

Sorts log files in decreasing order.
pull/3816/head
Jamie 4 years ago committed by GitHub
commit 148ae2ee71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,7 +24,8 @@ namespace Ombi.Controllers.V2
var logsFolder = Path.Combine(_hosting.ContentRootPath, "Logs"); var logsFolder = Path.Combine(_hosting.ContentRootPath, "Logs");
var files = Directory var files = Directory
.EnumerateFiles(logsFolder, "*.txt", SearchOption.TopDirectoryOnly) .EnumerateFiles(logsFolder, "*.txt", SearchOption.TopDirectoryOnly)
.Select(Path.GetFileName); .Select(Path.GetFileName)
.OrderByDescending(name => name);
return Ok(files); return Ok(files);
} }

Loading…
Cancel
Save