* map error 87 to 13 to be compatible with dos

This commit is contained in:
peter 2002-12-15 20:23:53 +00:00
parent 6e14067b99
commit a3c68549ec

View File

@ -209,7 +209,12 @@ type
function Last2DosError(d:dword):integer;
begin
Last2DosError:=d;
case d of
87 : { Parameter invalid -> Data invalid }
Last2DosError:=13;
else
Last2DosError:=d;
end;
end;
@ -379,7 +384,6 @@ var
l : Longint;
CommandLine : array[0..511] of char;
AppParam : array[0..255] of char;
SpacePos : integer;
pathlocal : string;
begin
DosError := 0;
@ -821,7 +825,8 @@ var
ft : TFileTime;
begin
if DosToWinTime(time,ft) then
SetFileTime(filerec(f).Handle,nil,nil,@ft);
if not SetFileTime(filerec(f).Handle,nil,nil,@ft) then;
DosError:=Last2DosError(GetLastError);
end;
@ -1032,7 +1037,10 @@ begin
end.
{
$Log$
Revision 1.16 2002-12-04 21:35:50 carl
Revision 1.17 2002-12-15 20:23:53 peter
* map error 87 to 13 to be compatible with dos
Revision 1.16 2002/12/04 21:35:50 carl
* bugfixes for dos.exec() : it would not be able to execute 16-bit apps
* doserror was not reset to zero in dos.exec