Skip to content

Commit

Permalink
Fix: Handle InvalidOperationException in RunPowershellCommandAsync (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 authored Jan 17, 2024
1 parent 2acac82 commit 385c54f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Files.App/Utils/Shell/Win32API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ public static async Task<bool> RunPowershellCommandAsync(string command, bool ru
{
return false;
}
catch (InvalidOperationException ex)
{
App.Logger.LogWarning(ex, ex.Message);
return false;
}
catch (Win32Exception)
{
// If user cancels UAC
Expand Down

0 comments on commit 385c54f

Please sign in to comment.