Skip to content

Commit 9dc0d94

Browse files
committed
enhance: make sure executable file of external tool is still available before opening it (#2019)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 9877bac commit 9dc0d94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Models/ExternalTool.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public ExternalTool(string name, string icon, string execFile, Func<string, stri
3636

3737
public void Open(string path)
3838
{
39+
// The executable file may be removed after the tool list is loaded (once time on startup).
40+
if (!File.Exists(ExecFile))
41+
return;
42+
3943
Process.Start(new ProcessStartInfo()
4044
{
4145
FileName = ExecFile,

0 commit comments

Comments
 (0)