mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 15:14:15 +01:00
move where statement to foreach in cleanup service
This commit is contained in:
parent
948e4e5dfe
commit
9092c4206f
1 changed files with 2 additions and 2 deletions
|
|
@ -55,8 +55,8 @@ namespace MareSynchronosServer
|
|||
{
|
||||
var prevTime = DateTime.Now.Subtract(TimeSpan.FromDays(filesOlderThanDays));
|
||||
|
||||
var allFiles = dbContext.Files.Where(f => f.Uploaded).ToList();
|
||||
foreach (var file in allFiles)
|
||||
var allFiles = dbContext.Files.ToList();
|
||||
foreach (var file in allFiles.Where(f => f.Uploaded))
|
||||
{
|
||||
var fileName = Path.Combine(_configuration["CacheDirectory"], file.Hash);
|
||||
var fi = new FileInfo(fileName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue