From 3f43dcf85089b62d12c4670adf7d00c9e50cf6ae Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Thu, 21 Jul 2022 17:41:08 -0400 Subject: [PATCH] Escaping application name to avoid an exception from Spectre attempting to parse a name in brackets as a color --- SteamPrefill/Models/AppInfoShim.cs | 3 ++- SteamPrefill/SteamPrefill.csproj | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SteamPrefill/Models/AppInfoShim.cs b/SteamPrefill/Models/AppInfoShim.cs index 665b5ca5..cd177fda 100644 --- a/SteamPrefill/Models/AppInfoShim.cs +++ b/SteamPrefill/Models/AppInfoShim.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; +using Spectre.Console; using SteamKit2; namespace SteamPrefill.Models @@ -94,7 +95,7 @@ private List BuildDepotInfos(KeyValue depotsRootKey) public override string ToString() { - return $"{Common?.Name}"; + return $"{Common?.Name.EscapeMarkup()}"; } } } diff --git a/SteamPrefill/SteamPrefill.csproj b/SteamPrefill/SteamPrefill.csproj index a5e35719..8b31af59 100644 --- a/SteamPrefill/SteamPrefill.csproj +++ b/SteamPrefill/SteamPrefill.csproj @@ -20,6 +20,7 @@ + true