+ Fix for command-line property

This commit is contained in:
michael 2004-08-13 10:00:52 +00:00
parent 29bae36989
commit 973bf7028d

View File

@ -304,9 +304,15 @@ begin
Try
Argv:=MakeCommand(Self);
Try
PName:=ApplicationName;
If (PName='') then
PName:=CommandLine;
If (Argv<>Nil) and (ArgV[0]<>Nil) then
PName:=StrPas(Argv[0])
else
begin
// This should never happen, actually.
PName:=ApplicationName;
If (PName='') then
PName:=CommandLine;
end;
if (pos('/',PName)<>1) then
PName:=FileSearch(Pname,fpgetenv('PATH'));
Pid:=fpfork;