Change to address os cases.

pull/583/head
Alstruit 10 months ago
parent d9ced51fd6
commit 7deefe0d42
No known key found for this signature in database
GPG Key ID: 4F57E6793C946CEC

@ -606,19 +606,25 @@ namespace DepotDownloader
!string.IsNullOrWhiteSpace(depotConfig["oslist"].Value)) !string.IsNullOrWhiteSpace(depotConfig["oslist"].Value))
{ {
var oslist = depotConfig["oslist"].Value.Split(','); var oslist = depotConfig["oslist"].Value.Split(',');
var osMatches = oslist.Contains(os ?? Util.GetSteamOS(), StringComparer.OrdinalIgnoreCase);
// Attempt fallback to Windows if no initial match found // Special case: empty oslist and appId + 1
if (!osMatches) if (oslist.Length == 0 && id == appId + 1)
{ {
osMatches = oslist.Contains("windows", StringComparer.OrdinalIgnoreCase); Console.WriteLine($"Warning: Depot {id} has an empty oslist and is being downloaded.");
depotIdsFound.Add(id);
depotManifestIds.Add((id, INVALID_MANIFEST_ID));
continue;
} }
// Print warning only if no match was found after fallback var osMatches = os != null
? oslist.Contains(os, StringComparer.OrdinalIgnoreCase)
: oslist.Contains(Util.GetSteamOS(), StringComparer.OrdinalIgnoreCase);
// If no match, skip this depot
if (!osMatches) if (!osMatches)
{ {
Console.WriteLine($"No matching OS found for depot {depotSection.Name} under AppID: {appId}."); Console.WriteLine($"No matching OS found for depot {depotSection.Name} under AppID: {appId}.");
continue; // Skip this depot continue;
} }
} }

Loading…
Cancel
Save