Browse Source

--- Merging r29529 into '.':
U rtl/os2/dos.pas
--- Merging r29530 into '.':
G rtl/os2/dos.pas
--- Merging r29538 into '.':
G rtl/os2/dos.pas

# revisions: 29529,29530,29538

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

marco 10 years ago
parent
commit
b5dec7c7cc
1 changed files with 17 additions and 3 deletions
  1. 17 3
      rtl/os2/dos.pas

+ 17 - 3
rtl/os2/dos.pas

@@ -168,6 +168,8 @@ begin
    begin
    begin
     Time:=0;
     Time:=0;
     OSErrorWatch (DosError);
     OSErrorWatch (DosError);
+    if DosError = 87 then
+     DosError := 6; (* Align to TP/BP behaviour *)
    end;
    end;
 end;
 end;
 
 
@@ -190,7 +192,11 @@ begin
      OSErrorWatch (RC);
      OSErrorWatch (RC);
    end
    end
   else
   else
-   OSErrorWatch (RC);
+   begin
+    OSErrorWatch (RC);
+    if RC = 87 then
+     RC := 6;
+   end;
   DosError := integer (RC);
   DosError := integer (RC);
 end;
 end;
 
 
@@ -721,7 +727,11 @@ begin
   if RC = 0 then
   if RC = 0 then
     Attr := PathInfo.AttrFile
     Attr := PathInfo.AttrFile
   else
   else
-   OSErrorWatch (RC);
+   begin
+    OSErrorWatch (RC);
+    if FileRec (F).Name [0] = #0 then
+     DosError := 3; (* Align the returned error value to TP/BP *)
+   end;
 end;
 end;
 
 
 
 
@@ -750,7 +760,11 @@ begin
      OSErrorWatch (RC);
      OSErrorWatch (RC);
    end
    end
   else
   else
-   OSErrorWatch (RC);
+   begin
+    OSErrorWatch (RC);
+    if FileRec (F).Name [0] = #0 then
+     DosError := 3; (* Align the returned error value to TP/BP *)
+   end;
   DosError := integer (RC);
   DosError := integer (RC);
 end;
 end;