DepotDownloader: Allow -manifest to download human readable manifest for Steam3 depots.

This commit is contained in:
Scott Ehlert committed 2013-02-20 17:44:41 -06:00
1 parent 46ce5de875
commit 08c63cc2db
1 file changed
+19 -1
+19 -1
View File
@@ -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;