From 08c63cc2db2365ec2416bc485cd40b216bb55e80 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 20 Feb 2013 17:44:41 -0600 Subject: [PATCH] DepotDownloader: Allow -manifest to download human readable manifest for Steam3 depots. --- DepotDownloader/ContentDownloader.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 38f2f2af..8949b846 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -791,9 +791,27 @@ namespace DepotDownloader ulong complete_download_size = 0; ulong size_downloaded = 0; - depotManifest.Files.RemoveAll((x) => !TestIsFileIncluded(x.FileName)); depotManifest.Files.Sort((x, y) => { return x.FileName.CompareTo(y.FileName); }); + if (Config.DownloadManifestOnly) + { + StringBuilder manifestBuilder = new StringBuilder(); + string txtManifest = Path.Combine(depot.installDir, string.Format("manifest_{0}.txt", depot.id)); + + foreach (var file in depotManifest.Files) + { + if (file.Flags.HasFlag(EDepotFileFlag.Directory)) + continue; + + manifestBuilder.Append(string.Format("{0}\n", file.FileName)); + } + + File.WriteAllText(txtManifest, manifestBuilder.ToString()); + continue; + } + + depotManifest.Files.RemoveAll((x) => !TestIsFileIncluded(x.FileName)); + foreach (var file in depotManifest.Files) { complete_download_size += file.TotalSize;