diff --git a/MareSynchronos/FileCache/PeriodicFileScanner.cs b/MareSynchronos/FileCache/PeriodicFileScanner.cs index fbf1b6f..63ed461 100644 --- a/MareSynchronos/FileCache/PeriodicFileScanner.cs +++ b/MareSynchronos/FileCache/PeriodicFileScanner.cs @@ -135,11 +135,11 @@ public class PeriodicFileScanner : MediatorSubscriberBase, IDisposable } }); - if (FileCacheSize < (long)(_configService.Current.MaxLocalCacheInGiB * 1024 * 1024 * 1024)) return false; + if (FileCacheSize < (long)(_configService.Current.MaxLocalCacheInGiB * 1024d * 1024d * 1024d)) return false; var allFiles = Directory.EnumerateFiles(_configService.Current.CacheFolder) .Select(f => new FileInfo(f)).OrderBy(f => f.LastAccessTime).ToList(); - while (FileCacheSize > (long)(_configService.Current.MaxLocalCacheInGiB * 1024 * 1024 * 1024)) + while (FileCacheSize > (long)(_configService.Current.MaxLocalCacheInGiB * 1024d * 1024d * 1024d)) { var oldestFile = allFiles[0]; FileCacheSize -= oldestFile.Length;