Bläddra i källkod

* 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 14 år sedan
förälder
incheckning
6d89ec4ee4
1 ändrade filer med 5 tillägg och 1 borttagningar
  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}