Skip to content

Commit 4eba538

Browse files
committed
Simplify LINQ
1 parent d5abf7b commit 4eba538

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/DntSite.Web/Features/SiteBackup/Utils/UploadBackupsExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public static bool UseProvidedParts(this PartsInfo? parts, string? currentZipPas
3636
var safeFileName = WebUtility.HtmlEncode(Path.GetFileNameWithoutExtension(partPaths.First()));
3737
var safeDateTime = WebUtility.HtmlEncode(DateTime.IranNowUtc.Persian.Text.LongDateTime);
3838

39-
var totalSize = partPaths.Select(file => new FileInfo(file).Length)
40-
.Sum()
39+
var totalSize = partPaths.Sum(file => new FileInfo(file).Length)
4140
.ToFormattedFileSize()
4241
.ToPersianNumbers();
4342

0 commit comments

Comments
 (0)