From 1a0c006e06517c88d1df7f4b1431c33c58bde924 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 4 Jun 2015 15:54:14 +0200 Subject: [PATCH] exeInSysPath uses exeFullName --- src/ce_common.pas | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/ce_common.pas b/src/ce_common.pas index 965d8118..dbab9447 100644 --- a/src/ce_common.pas +++ b/src/ce_common.pas @@ -690,22 +690,8 @@ begin end; function exeInSysPath(anExeName: string): boolean; -var - ext: string; - env: string; begin - ext := extractFileExt(anExeName); - if ext <> exeExt then - anExeName += exeExt; - if FileExists(anExeName) then - exit(true) - else - begin - env := sysutils.GetEnvironmentVariable('PATH'); - if Application <> nil then - env += PathSeparator + ExtractFileDir(ExtractFilePath(application.ExeName)); - exit(ExeSearch(anExeName, env) <> ''); - end; + exit(exeFullName(anExeName) <> ''); end; function exeFullName(anExeName: string): string;