Skip to content

Commit

Permalink
Fixed access to TgDownloader.xml for TgDownloaderConsole
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianMorozov committed Jan 4, 2025
1 parent c4f7e41 commit 02f39b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/TgStorage/Helpers/TgAppSettingsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public TgAppSettingsHelper()

public void LoadXmlSettings(Encoding? encoding = null)
{
if (TgAsyncUtils.AppType != TgEnumAppType.Console) return;
if (TgAsyncUtils.AppType != TgEnumAppType.Console && TgAsyncUtils.AppType != TgEnumAppType.Default) return;

if (!File.Exists(TgFileUtils.FileAppXmlSettings)) return;
using StreamReader streamReader = new(TgFileUtils.FileAppXmlSettings, encoding ?? Encoding.Unicode);
Expand All @@ -62,7 +62,7 @@ public void DefaultXmlSettings(Encoding? encoding = null)

public void StoreXmlSettings(Encoding? encoding = null)
{
if (TgAsyncUtils.AppType != TgEnumAppType.Console) return;
if (TgAsyncUtils.AppType != TgEnumAppType.Console && TgAsyncUtils.AppType != TgEnumAppType.Default) return;

var xml = TgDataFormatUtils.SerializeAsXmlDocument(AppXml, isAddEmptyNamespace: true).InnerXml;
xml = TgDataFormatUtils.GetPrettyXml(xml);
Expand Down

0 comments on commit 02f39b0

Please sign in to comment.