Skip to content

Commit

Permalink
Merge pull request #80 from FrozenAssassine/fixfor#77
Browse files Browse the repository at this point in the history
When closing not loaded tab, app saves emty file
  • Loading branch information
FrozenAssassine authored Feb 7, 2023
2 parents 680c69e + 6ecb6b1 commit ece0db3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Fastedit/Storage/SaveFileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public static async Task<bool> Save(TabPageItem tab)
if (tab == null)
return false;

//the textbox does not has any data when the tab is not loaded -> file will be emty: (#77)
if (!tab.DataIsLoaded)
await TabPageHelper.LoadUnloadedTab(tab);

//file was already saved
if (tab.DatabaseItem.FileToken.Length > 0)
{
Expand Down

0 comments on commit ece0db3

Please sign in to comment.