Skip to content

Commit

Permalink
Pass path to GetVariantSAV(), closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 5, 2024
1 parent 04040c7 commit 3c3eabd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Pkmds.Web/Components/Layout/MainLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ private async Task ShowLoadSaveFileDialog()
if (result is { Data: IBrowserFile selectedFile })
{
browserLoadSaveFile = selectedFile;
await LoadSaveFile();
await LoadSaveFile(selectedFile);
}
}

private async Task LoadSaveFile()
private async Task LoadSaveFile(IBrowserFile selectedFile)
{
if (browserLoadSaveFile is null)
{
Expand All @@ -76,7 +76,7 @@ private async Task LoadSaveFile()
using var memoryStream = new MemoryStream();
await fileStream.CopyToAsync(memoryStream);
var data = memoryStream.ToArray();
AppState.SaveFile = SaveUtil.GetVariantSAV(data);
AppState.SaveFile = SaveUtil.GetVariantSAV(data, path: selectedFile.Name);

if (AppState.SaveFile is null)
{
Expand Down

0 comments on commit 3c3eabd

Please sign in to comment.