From 140f7705cfd750d05b615d269942bb67825ec284 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 19 Feb 2013 07:45:41 -0500 Subject: [PATCH] DepotDownloader: don't use dedicatedserverfolder for Steam3 downloads. --- DepotDownloader/ContentDownloader.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 59004e7c..6cab628d 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -71,7 +71,7 @@ namespace DepotDownloader } } - static bool CreateDirectories( int depotId, uint depotVersion, out string installDir ) + static bool CreateDirectories( int depotId, uint depotVersion, DownloadSource source, out string installDir ) { installDir = null; try @@ -90,15 +90,16 @@ namespace DepotDownloader { Directory.CreateDirectory(ContentDownloader.Config.InstallDirectory); - string serverFolder = CDRManager.GetDedicatedServerFolder( depotId ); - if ( serverFolder != null && serverFolder != "" ) - { - installDir = Path.Combine(ContentDownloader.Config.InstallDirectory, serverFolder); - Directory.CreateDirectory(installDir); - } - else + installDir = ContentDownloader.Config.InstallDirectory; + + if (source == DownloadSource.Steam2) { - installDir = ContentDownloader.Config.InstallDirectory; + string serverFolder = CDRManager.GetDedicatedServerFolder(depotId); + if (serverFolder != null && serverFolder != "") + { + installDir = Path.Combine(ContentDownloader.Config.InstallDirectory, serverFolder); + Directory.CreateDirectory(installDir); + } } } } @@ -650,7 +651,7 @@ namespace DepotDownloader } string installDir; - if (!CreateDirectories(depotId, uVersion, out installDir)) + if (!CreateDirectories(depotId, uVersion, source, out installDir)) { Console.WriteLine("Error: Unable to create install directories!"); return null;