Skip to content

Commit

Permalink
NR adapt path for saving settings and data file
Browse files Browse the repository at this point in the history
  • Loading branch information
jbe2277 committed Oct 14, 2023
1 parent 617fd92 commit 3bfd213
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/NewsReader/NewsReader.Presentation/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public App(ISettingsService settingsService, IAppInfoService appInfoService, Laz
InitializeLogging();

settingsService.ErrorOccurred += (_, e) => Log.Default.Error("SettingsService error: {0}" + e.Error);
settingsService.FileName = Path.Combine(FileSystem.AppDataDirectory, "Settings.xml");
localizationService?.Initialize();
InitializeCultures(settingsService.Get<AppSettings>());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Waf.NewsReader.Presentation.Services;

public class DataService : IDataService
{
private static readonly string containerFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "data.zip");
private static readonly string containerFileName = Path.Combine(FileSystem.AppDataDirectory, "data.zip");
private const string itemFileName = "data.xml";

public Stream GetReadStream() => File.OpenRead(containerFileName);
Expand Down

0 comments on commit 3bfd213

Please sign in to comment.