mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 21:09:11 +02:00
a slightly less broken getpathstring() for dos unit. yes, sadly this code is still in use on MorphOS, sysutils wraps to it
git-svn-id: trunk@26831 -
This commit is contained in:
parent
ab3f5744e0
commit
e286a7462c
@ -881,17 +881,24 @@ var
|
|||||||
s : string;
|
s : string;
|
||||||
found : boolean;
|
found : boolean;
|
||||||
temp : string[255];
|
temp : string[255];
|
||||||
|
tmpBat: string[31];
|
||||||
|
tmpList: string[31];
|
||||||
begin
|
begin
|
||||||
found := true;
|
found := true;
|
||||||
temp := '';
|
temp := '';
|
||||||
assign(f,'ram:makepathstr');
|
|
||||||
|
tmpBat:='T:'+HexStr(FindTask(nil));
|
||||||
|
tmpList:=tmpBat+'_path.tmp';
|
||||||
|
tmpBat:=tmpBat+'_path.sh';
|
||||||
|
|
||||||
|
assign(f,tmpBat);
|
||||||
rewrite(f);
|
rewrite(f);
|
||||||
writeln(f,'path >ram:temp.lst');
|
writeln(f,'path >'+tmpList);
|
||||||
close(f);
|
close(f);
|
||||||
exec('c:protect','ram:makepathstr sarwed quiet');
|
exec('C:Execute',tmpBat);
|
||||||
exec('C:execute','ram:makepathstr');
|
erase(f);
|
||||||
exec('c:delete','ram:makepathstr quiet');
|
|
||||||
assign(f,'ram:temp.lst');
|
assign(f,tmpList);
|
||||||
reset(f);
|
reset(f);
|
||||||
{ skip the first line, garbage }
|
{ skip the first line, garbage }
|
||||||
if not eof(f) then readln(f,s);
|
if not eof(f) then readln(f,s);
|
||||||
@ -906,7 +913,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
close(f);
|
close(f);
|
||||||
exec('C:delete','ram:temp.lst quiet');
|
erase(f);
|
||||||
|
|
||||||
getpathstring := temp;
|
getpathstring := temp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user