aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/depotdownloader-json/2_7/0001-ProtoManifest-sort-files-in-constructor.patch
blob: 3cc62b851c2849f0875742ce6b9db264966a3e26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 1ecf96ef85c9d2d14619da93bd5a5ce53a74d8ad Mon Sep 17 00:00:00 2001
From: yuuko <yuuko@kurofuku.me>
Date: Wed, 1 Nov 2023 06:46:57 -0700
Subject: [PATCH 1/2] ProtoManifest: sort files in constructor

---
 DepotDownloader/ProtoManifest.cs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/DepotDownloader/ProtoManifest.cs b/DepotDownloader/ProtoManifest.cs
index b6eb010..260fdef 100644
--- a/DepotDownloader/ProtoManifest.cs
+++ b/DepotDownloader/ProtoManifest.cs
@@ -23,6 +23,7 @@ namespace DepotDownloader
         public ProtoManifest(DepotManifest sourceManifest, ulong id) : this()
         {
             sourceManifest.Files.ForEach(f => Files.Add(new FileData(f)));
+            Files.Sort((f1,f2) => f1.FileName.CompareTo(f2.FileName));
             ID = id;
             CreationTime = sourceManifest.CreationTime;
         }
-- 
2.47.0