mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 04:49:19 +02:00
* map error 87 to 13 to be compatible with dos
This commit is contained in:
parent
6e14067b99
commit
a3c68549ec
@ -209,7 +209,12 @@ type
|
|||||||
|
|
||||||
function Last2DosError(d:dword):integer;
|
function Last2DosError(d:dword):integer;
|
||||||
begin
|
begin
|
||||||
Last2DosError:=d;
|
case d of
|
||||||
|
87 : { Parameter invalid -> Data invalid }
|
||||||
|
Last2DosError:=13;
|
||||||
|
else
|
||||||
|
Last2DosError:=d;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -379,18 +384,17 @@ var
|
|||||||
l : Longint;
|
l : Longint;
|
||||||
CommandLine : array[0..511] of char;
|
CommandLine : array[0..511] of char;
|
||||||
AppParam : array[0..255] of char;
|
AppParam : array[0..255] of char;
|
||||||
SpacePos : integer;
|
pathlocal : string;
|
||||||
pathlocal : string;
|
|
||||||
begin
|
begin
|
||||||
DosError := 0;
|
DosError := 0;
|
||||||
FillChar(SI, SizeOf(SI), 0);
|
FillChar(SI, SizeOf(SI), 0);
|
||||||
SI.cb:=SizeOf(SI);
|
SI.cb:=SizeOf(SI);
|
||||||
SI.wShowWindow:=1;
|
SI.wShowWindow:=1;
|
||||||
{ always surroound the name of the application by quotes
|
{ always surroound the name of the application by quotes
|
||||||
so that long filenames will always be accepted. But don't
|
so that long filenames will always be accepted. But don't
|
||||||
do it if there are already double quotes, since Win32 does not
|
do it if there are already double quotes, since Win32 does not
|
||||||
like double quotes which are duplicated!
|
like double quotes which are duplicated!
|
||||||
}
|
}
|
||||||
if pos('"',path) = 0 then
|
if pos('"',path) = 0 then
|
||||||
pathlocal:='"'+path+'"'
|
pathlocal:='"'+path+'"'
|
||||||
else
|
else
|
||||||
@ -821,7 +825,8 @@ var
|
|||||||
ft : TFileTime;
|
ft : TFileTime;
|
||||||
begin
|
begin
|
||||||
if DosToWinTime(time,ft) then
|
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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1032,7 +1037,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* bugfixes for dos.exec() : it would not be able to execute 16-bit apps
|
||||||
* doserror was not reset to zero in dos.exec
|
* doserror was not reset to zero in dos.exec
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user