mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 06:00:50 -07:00
Merge pull request #3799 from bernarden/feature/sorting-logs-in-decreasing-order
Sorts log files in decreasing order.
This commit is contained in:
commit
148ae2ee71
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue