Skip to content

Commit

Permalink
Merge pull request #100 from MicaApps/fix/package-path-crash
Browse files Browse the repository at this point in the history
fix crash due to package path api not available in older windows 10
  • Loading branch information
Sanlorng authored Oct 31, 2023
2 parents b92ccca + 8d9c853 commit c7d71d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MicaApps.Mail.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public App()

private async Task InitalizeDatabaseAsync()
{
await Services.GetService<IDbContext>().Session.ExecuteReaderAsync(await PathIO.ReadTextAsync(Path.Combine(Package.Current.InstalledPath, "Assets", "sql.sql")));
var path = Package.Current.InstalledLocation.Path;
await Services.GetService<IDbContext>().Session.ExecuteReaderAsync(await PathIO.ReadTextAsync(Path.Combine(path, "Assets", "sql.sql")));
}

private IServiceProvider RegisterServices()
Expand Down

0 comments on commit c7d71d5

Please sign in to comment.