mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix depot sort
This commit is contained in:
@@ -1948,7 +1948,8 @@ namespace SabreTools.Library.DatFiles
|
|||||||
Items.BucketBy(BucketedBy.SHA1, DedupeType.None);
|
Items.BucketBy(BucketedBy.SHA1, DedupeType.None);
|
||||||
|
|
||||||
// Then we want to loop through each of the hashes and see if we can rebuild
|
// Then we want to loop through each of the hashes and see if we can rebuild
|
||||||
foreach (string hash in Items.Keys)
|
var keys = Items.SortedKeys.ToList();
|
||||||
|
foreach (string hash in keys)
|
||||||
{
|
{
|
||||||
// Pre-empt any issues that could arise from string length
|
// Pre-empt any issues that could arise from string length
|
||||||
if (hash.Length != Constants.SHA1Length)
|
if (hash.Length != Constants.SHA1Length)
|
||||||
@@ -1982,6 +1983,10 @@ namespace SabreTools.Library.DatFiles
|
|||||||
if (fileinfo == null)
|
if (fileinfo == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// If there are no items in the hash, we continue
|
||||||
|
if (Items[hash] == null || Items[hash].Count == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Otherwise, we rebuild that file to all locations that we need to
|
// Otherwise, we rebuild that file to all locations that we need to
|
||||||
bool usedInternally;
|
bool usedInternally;
|
||||||
if (Items[hash][0].ItemType == ItemType.Disk)
|
if (Items[hash][0].ItemType == ItemType.Disk)
|
||||||
|
|||||||
Reference in New Issue
Block a user