From 0cd728d95cd08bd7d1f20945bb5760450395023b Mon Sep 17 00:00:00 2001 From: Victor Usoltsev Date: Wed, 7 Oct 2020 16:45:50 +1300 Subject: [PATCH] Sorts log files in decreasing order. --- src/Ombi/Controllers/V2/SystemController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ombi/Controllers/V2/SystemController.cs b/src/Ombi/Controllers/V2/SystemController.cs index 590c2f2cd..924532eda 100644 --- a/src/Ombi/Controllers/V2/SystemController.cs +++ b/src/Ombi/Controllers/V2/SystemController.cs @@ -24,7 +24,8 @@ namespace Ombi.Controllers.V2 var logsFolder = Path.Combine(_hosting.ContentRootPath, "Logs"); var files = Directory .EnumerateFiles(logsFolder, "*.txt", SearchOption.TopDirectoryOnly) - .Select(Path.GetFileName); + .Select(Path.GetFileName) + .OrderByDescending(name => name); return Ok(files); }