From c4e3360dc492968537193600d380e7fc359c350d Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Mon, 27 Jun 2011 02:40:00 -0500 Subject: [PATCH] DepotDownloader: No longer downloads depots meant for other platforms when the -game option is used. --- DepotDownloader/CDRManager.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/DepotDownloader/CDRManager.cs b/DepotDownloader/CDRManager.cs index 58501ad1..b8f3d660 100644 --- a/DepotDownloader/CDRManager.cs +++ b/DepotDownloader/CDRManager.cs @@ -170,14 +170,20 @@ namespace DepotDownloader App serverAppInfoBlob = GetAppBlob( 4 ); + PlatformID platform = Environment.OSVersion.Platform; + string suffix = ""; + + if (platform == PlatformID.Win32NT) + suffix = "-win32"; + else if (platform == PlatformID.Unix) + suffix = "-linux"; + foreach ( var blobField in serverAppInfoBlob.FileSystems ) { - string mountName = blobField.Name; if ( mountName.Equals( gameName, StringComparison.OrdinalIgnoreCase ) || - mountName.Equals( gameName + "-win32", StringComparison.OrdinalIgnoreCase ) || - mountName.Equals( gameName + "-linux", StringComparison.OrdinalIgnoreCase ) ) + mountName.Equals( gameName + suffix, StringComparison.OrdinalIgnoreCase ) ) { appIDs.Add( blobField.AppID ); }