mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PTRun][Program]If win32 program redirection path is null, do not overwrite iconPath (#31170)
This commit is contained in:
@@ -930,15 +930,15 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
|
|
||||||
private static bool TryGetIcoPathForRunCommandProgram(Win32Program program, out string icoPath)
|
private static bool TryGetIcoPathForRunCommandProgram(Win32Program program, out string icoPath)
|
||||||
{
|
{
|
||||||
|
icoPath = null;
|
||||||
|
|
||||||
if (program.AppType != ApplicationType.RunCommand)
|
if (program.AppType != ApplicationType.RunCommand)
|
||||||
{
|
{
|
||||||
icoPath = null;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(program.FullPath))
|
if (string.IsNullOrEmpty(program.FullPath))
|
||||||
{
|
{
|
||||||
icoPath = null;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -946,6 +946,11 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var redirectionPath = ReparsePoint.GetTarget(program.FullPath);
|
var redirectionPath = ReparsePoint.GetTarget(program.FullPath);
|
||||||
|
if (string.IsNullOrEmpty(redirectionPath))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
icoPath = ExpandEnvironmentVariables(redirectionPath);
|
icoPath = ExpandEnvironmentVariables(redirectionPath);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user