mirror of https://gitlab.com/basile.b/dexed.git
fix, getExeFullPath did not work when file was in cwd
This commit is contained in:
parent
26196d8a23
commit
f3ee6451b8
|
@ -496,9 +496,9 @@ end;
|
|||
|
||||
function uniqueObjStr(const aObject: Tobject): string;
|
||||
begin
|
||||
{$HINTS OFF}{$WARNINGS OFF}
|
||||
{$HINTS OFF}{$WARNINGS OFF}{$R-}
|
||||
exit( format('%.8X',[NativeUint(aObject)]));
|
||||
{$HINTS ON}{$WARNINGS ON}
|
||||
{$HINTS ON}{$WARNINGS ON}{$R+}
|
||||
end;
|
||||
|
||||
function shortenPath(const aPath: string; charThresh: Word = 60): string;
|
||||
|
@ -726,18 +726,15 @@ begin
|
|||
ext := extractFileExt(anExeName);
|
||||
if ext = '' then
|
||||
anExeName += exeExt;
|
||||
if FileExists(anExeName) then
|
||||
exit(anExeName)
|
||||
else
|
||||
begin
|
||||
env := sysutils.GetEnvironmentVariable('PATH');
|
||||
if FileExists(anExeName) then
|
||||
env += PathSeparator + GetCurrentDir;
|
||||
{$IFNDEF CEBUILD}
|
||||
if Application <> nil then
|
||||
env += PathSeparator + ExtractFileDir(ExtractFilePath(application.ExeName));
|
||||
{$ENDIF}
|
||||
exit(ExeSearch(anExeName, env));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure processOutputToStrings(aProcess: TProcess; var aList: TStringList);
|
||||
var
|
||||
|
|
Loading…
Reference in New Issue