mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix non exe lnk
for lnk like control panel.lnk, it has no target and no exe extension.
This commit is contained in:
parent
216e9c0125
commit
281e03055d
1 changed files with 2 additions and 7 deletions
|
|
@ -150,10 +150,9 @@ namespace Wox.Plugin.Program.Programs
|
|||
const uint SLGP_SHORTPATH = 1;
|
||||
link.GetPath(buffer, buffer.Capacity, ref data, SLGP_SHORTPATH);
|
||||
var target = buffer.ToString();
|
||||
if (!string.IsNullOrEmpty(target) && Extension(target) == ExeExtension)
|
||||
var extension = Extension(target);
|
||||
if (!string.IsNullOrEmpty(target) && (extension == ExeExtension))
|
||||
{
|
||||
program.Valid = true;
|
||||
|
||||
buffer = new StringBuilder(MAX_PATH);
|
||||
link.GetDescription(buffer, MAX_PATH);
|
||||
var description = buffer.ToString();
|
||||
|
|
@ -170,10 +169,6 @@ namespace Wox.Plugin.Program.Programs
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
program.Valid = false;
|
||||
}
|
||||
return program;
|
||||
}
|
||||
catch (Exception)
|
||||
|
|
|
|||
Loading…
Reference in a new issue