mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Dev/crutkas/fixing warnings (#5161)
* new lines & braces * Tabs /space auto fix Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
@@ -198,7 +198,7 @@ namespace Microsoft.Plugin.Shell
|
||||
else if (_settings.Shell == Shell.RunCommand)
|
||||
{
|
||||
//Open explorer if the path is a file or directory
|
||||
if(Directory.Exists(command) || File.Exists(command))
|
||||
if (Directory.Exists(command) || File.Exists(command))
|
||||
{
|
||||
info = ShellCommand.SetProcessStartInfo("explorer.exe", arguments: command, verb: runAsAdministratorArg);
|
||||
}
|
||||
@@ -236,11 +236,11 @@ namespace Microsoft.Plugin.Shell
|
||||
return info;
|
||||
}
|
||||
|
||||
private void Execute(Func<ProcessStartInfo, Process> startProcess,ProcessStartInfo info)
|
||||
private void Execute(Func<ProcessStartInfo, Process> startProcess, ProcessStartInfo info)
|
||||
{
|
||||
try
|
||||
{
|
||||
startProcess(info);
|
||||
startProcess(info);
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ namespace Microsoft.Plugin.Shell
|
||||
var message = $"Command not found: {e.Message}";
|
||||
_context.API.ShowMsg(name, message);
|
||||
}
|
||||
catch(Win32Exception e)
|
||||
catch (Win32Exception e)
|
||||
{
|
||||
var name = "Plugin: Shell";
|
||||
var message = $"Error running the command: {e.Message}";
|
||||
|
||||
Reference in New Issue
Block a user