mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[PTRun][Program]List special empty shortcuts (#17517)
This commit is contained in:
@@ -487,8 +487,14 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
var program = CreateWin32Program(path);
|
var program = CreateWin32Program(path);
|
||||||
string target = ShellLinkHelper.RetrieveTargetPath(path);
|
string target = ShellLinkHelper.RetrieveTargetPath(path);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(target) && (File.Exists(target) || Directory.Exists(target)))
|
if (!string.IsNullOrEmpty(target))
|
||||||
{
|
{
|
||||||
|
if (!(File.Exists(target) || Directory.Exists(target)))
|
||||||
|
{
|
||||||
|
// If the link points nowhere, consider it invalid.
|
||||||
|
return InvalidProgram;
|
||||||
|
}
|
||||||
|
|
||||||
program.LnkResolvedPath = program.FullPath;
|
program.LnkResolvedPath = program.FullPath;
|
||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
@@ -515,11 +521,6 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// If the link points nowhere, consider it invalid.
|
|
||||||
return InvalidProgram;
|
|
||||||
}
|
|
||||||
|
|
||||||
return program;
|
return program;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user