浏览代码

* align DosError returned for empty filename in GetFAttr and SetFAttr to TP/BP

git-svn-id: trunk@29530 -
Tomas Hajny 10 年之前
父节点
当前提交
5176a069cf
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      rtl/os2/dos.pas

+ 10 - 2
rtl/os2/dos.pas

@@ -694,7 +694,11 @@ begin
   if RC = 0 then
     Attr := PathInfo.AttrFile
   else
-   OSErrorWatch (RC);
+   begin
+    OSErrorWatch (RC);
+    if FileRec (F).Name = '' then
+     DosError := 3; (* Align the returned error value to TP/BP *)
+   end;
 end;
 
 
@@ -723,7 +727,11 @@ begin
      OSErrorWatch (RC);
    end
   else
-   OSErrorWatch (RC);
+   begin
+    OSErrorWatch (RC);
+    if FileRec (F).Name = '' then
+     DosError := 3; (* Align the returned error value to TP/BP *)
+   end;
   DosError := integer (RC);
 end;