mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 05:08:06 +02:00
parent
ace95e550b
commit
ebd1c6026c
@ -422,10 +422,15 @@ Var
|
||||
Begin
|
||||
SystemFileName:=ToSingleByteFileSystemEncodedFileName(Filename);
|
||||
New(FS);
|
||||
FillChar(FS, SizeOf(FS^), 0);
|
||||
FS^.AttrFile:=Attr;
|
||||
RC := DosSetPathInfo(PChar (SystemFileName), ilStandard, FS, SizeOf(FS^), 0);
|
||||
if RC <> 0 then
|
||||
RC := DosQueryPathInfo (PChar (SystemFileName), ilStandard, FS, SizeOf (FS^));
|
||||
if RC = 0 then
|
||||
begin
|
||||
FS^.AttrFile:=Attr;
|
||||
RC := DosSetPathInfo(PChar (SystemFileName), ilStandard, FS, SizeOf(FS^), 0);
|
||||
if RC <> 0 then
|
||||
OSErrorWatch (RC);
|
||||
end
|
||||
else
|
||||
OSErrorWatch (RC);
|
||||
Result := - longint (RC);
|
||||
Dispose(FS);
|
||||
|
Loading…
Reference in New Issue
Block a user