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;
|
function uniqueObjStr(const aObject: Tobject): string;
|
||||||
begin
|
begin
|
||||||
{$HINTS OFF}{$WARNINGS OFF}
|
{$HINTS OFF}{$WARNINGS OFF}{$R-}
|
||||||
exit( format('%.8X',[NativeUint(aObject)]));
|
exit( format('%.8X',[NativeUint(aObject)]));
|
||||||
{$HINTS ON}{$WARNINGS ON}
|
{$HINTS ON}{$WARNINGS ON}{$R+}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function shortenPath(const aPath: string; charThresh: Word = 60): string;
|
function shortenPath(const aPath: string; charThresh: Word = 60): string;
|
||||||
|
@ -726,18 +726,15 @@ begin
|
||||||
ext := extractFileExt(anExeName);
|
ext := extractFileExt(anExeName);
|
||||||
if ext = '' then
|
if ext = '' then
|
||||||
anExeName += exeExt;
|
anExeName += exeExt;
|
||||||
if FileExists(anExeName) then
|
|
||||||
exit(anExeName)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
env := sysutils.GetEnvironmentVariable('PATH');
|
env := sysutils.GetEnvironmentVariable('PATH');
|
||||||
|
if FileExists(anExeName) then
|
||||||
|
env += PathSeparator + GetCurrentDir;
|
||||||
{$IFNDEF CEBUILD}
|
{$IFNDEF CEBUILD}
|
||||||
if Application <> nil then
|
if Application <> nil then
|
||||||
env += PathSeparator + ExtractFileDir(ExtractFilePath(application.ExeName));
|
env += PathSeparator + ExtractFileDir(ExtractFilePath(application.ExeName));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
exit(ExeSearch(anExeName, env));
|
exit(ExeSearch(anExeName, env));
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
procedure processOutputToStrings(aProcess: TProcess; var aList: TStringList);
|
procedure processOutputToStrings(aProcess: TProcess; var aList: TStringList);
|
||||||
var
|
var
|
||||||
|
|
Loading…
Reference in New Issue