Преглед изворни кода

* SysUtils unit, fixed return value of FileSetDate:
* return value of GetLastOSError if one is available, to be consistent with handle-based implementations and Delphi behavior.
* otherwise, return -1

git-svn-id: trunk@16318 -

sergei пре 15 година
родитељ
комит
6d89ec4ee4
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      rtl/objpas/sysutils/sysutils.inc

+ 5 - 1
rtl/objpas/sysutils/sysutils.inc

@@ -84,7 +84,11 @@
         FileClose(fd);
       end
     else
-      Result:=fd;
+  {$ifdef HAS_OSERROR}
+      Result:=GetLastOSError;
+  {$else}
+      Result:=-1;
+  {$endif}
   end;
   {$endif}