mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +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);
|
||||
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;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user