mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-11 05:52:19 +02:00
Allow unsafe codes in Release build.
This commit is contained in:
@@ -76,25 +76,6 @@ namespace Wox.Plugin.FindFile
|
||||
{
|
||||
List<Result> contextMenus = new List<Result>();
|
||||
|
||||
contextMenus.Add(new Result()
|
||||
{
|
||||
Title = "Open",
|
||||
Action = _ =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(record.FullPath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
context.API.ShowMsg("Can't open " + record.FullPath, string.Empty, string.Empty);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/open.png"
|
||||
});
|
||||
|
||||
if (!record.IsFolder)
|
||||
{
|
||||
contextMenus.Add(new Result()
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
|
||||
@@ -47,18 +47,7 @@ namespace Wox.Plugin.SystemPlugins.Program
|
||||
{
|
||||
new Result()
|
||||
{
|
||||
Title = "Open",
|
||||
Action = _ =>
|
||||
{
|
||||
context.API.HideApp();
|
||||
context.API.ShellRun(c.ExecutePath);
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/open.png"
|
||||
},
|
||||
new Result()
|
||||
{
|
||||
Title = "Open With Administrator",
|
||||
Title = "Run As Administrator",
|
||||
Action = _ =>
|
||||
{
|
||||
context.API.HideApp();
|
||||
|
||||
Reference in New Issue
Block a user