mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-24 03:59:35 +01:00
+ merged MorphOS changes
git-svn-id: trunk@5999 -
This commit is contained in:
parent
98f983ce08
commit
baf13df198
@ -302,11 +302,8 @@ var
|
|||||||
validDate: boolean;
|
validDate: boolean;
|
||||||
begin
|
begin
|
||||||
result:=-1; { We emulate Linux/Unix behaviour, and return -1 on errors. }
|
result:=-1; { We emulate Linux/Unix behaviour, and return -1 on errors. }
|
||||||
|
|
||||||
tmpStr:=PathConv(path)+#0;
|
tmpStr:=PathConv(path)+#0;
|
||||||
Rslt.Name := tmpStr;
|
|
||||||
{ "128" is Windows "NORMALFILE" attribute. Some buggy code depend on this... :( (KB) }
|
|
||||||
Rslt.Attr := Attr or 128;
|
|
||||||
{ $1e = faHidden or faSysFile or faVolumeID or faDirectory }
|
{ $1e = faHidden or faSysFile or faVolumeID or faDirectory }
|
||||||
Rslt.ExcludeAttr := (not Attr) and ($1e);
|
Rslt.ExcludeAttr := (not Attr) and ($1e);
|
||||||
Rslt.FindHandle := 0;
|
Rslt.FindHandle := 0;
|
||||||
@ -318,10 +315,15 @@ begin
|
|||||||
Rslt.FindHandle := longint(Anchor);
|
Rslt.FindHandle := longint(Anchor);
|
||||||
|
|
||||||
with Anchor^.ap_Info do begin
|
with Anchor^.ap_Info do begin
|
||||||
|
Rslt.Name := StrPas(fib_FileName);
|
||||||
|
|
||||||
Rslt.Size := fib_Size;
|
Rslt.Size := fib_Size;
|
||||||
Rslt.Time := DateTimeToFileDate(AmigaFileDateToDateTime(fib_Date,validDate));
|
Rslt.Time := DateTimeToFileDate(AmigaFileDateToDateTime(fib_Date,validDate));
|
||||||
if not validDate then exit;
|
if not validDate then exit;
|
||||||
|
|
||||||
|
{ "128" is Windows "NORMALFILE" attribute. Some buggy code depend on this... :( (KB) }
|
||||||
|
Rslt.Attr := 128;
|
||||||
|
|
||||||
if fib_DirEntryType > 0 then Rslt.Attr:=Rslt.Attr or faDirectory;
|
if fib_DirEntryType > 0 then Rslt.Attr:=Rslt.Attr or faDirectory;
|
||||||
if ((fib_Protection and FIBF_READ) <> 0) and
|
if ((fib_Protection and FIBF_READ) <> 0) and
|
||||||
((fib_Protection and FIBF_WRITE) = 0) then Rslt.Attr:=Rslt.Attr or faReadOnly;
|
((fib_Protection and FIBF_WRITE) = 0) then Rslt.Attr:=Rslt.Attr or faReadOnly;
|
||||||
@ -343,10 +345,13 @@ begin
|
|||||||
if MatchNext(Anchor) <> 0 then exit;
|
if MatchNext(Anchor) <> 0 then exit;
|
||||||
|
|
||||||
with Anchor^.ap_Info do begin
|
with Anchor^.ap_Info do begin
|
||||||
|
Rslt.Name := StrPas(fib_FileName);
|
||||||
Rslt.Size := fib_Size;
|
Rslt.Size := fib_Size;
|
||||||
Rslt.Time := DateTimeToFileDate(AmigaFileDateToDateTime(fib_Date,validDate));
|
Rslt.Time := DateTimeToFileDate(AmigaFileDateToDateTime(fib_Date,validDate));
|
||||||
if not validDate then exit;
|
if not validDate then exit;
|
||||||
|
|
||||||
|
{ "128" is Windows "NORMALFILE" attribute. Some buggy code depend on this... :( (KB) }
|
||||||
|
Rslt.Attr := 128;
|
||||||
if fib_DirEntryType > 0 then Rslt.Attr:=Rslt.Attr or faDirectory;
|
if fib_DirEntryType > 0 then Rslt.Attr:=Rslt.Attr or faDirectory;
|
||||||
if ((fib_Protection and FIBF_READ) <> 0) and
|
if ((fib_Protection and FIBF_READ) <> 0) and
|
||||||
((fib_Protection and FIBF_WRITE) = 0) then Rslt.Attr:=Rslt.Attr or faReadOnly;
|
((fib_Protection and FIBF_WRITE) = 0) then Rslt.Attr:=Rslt.Attr or faReadOnly;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user