Forráskód Böngészése

--- Merging r32019 into '.':
U rtl/os2/sysutils.pp
--- Recording mergeinfo for merge of r32019 into '.':
U .

# revisions: 32019

git-svn-id: branches/fixes_3_0@32027 -

joost 9 éve
szülő
commit
6543ae75c9
1 módosított fájl, 9 hozzáadás és 4 törlés
  1. 9 4
      rtl/os2/sysutils.pp

+ 9 - 4
rtl/os2/sysutils.pp

@@ -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);