From 5176a069cf745cdacdbac8cc177a3cdccb8fefdd Mon Sep 17 00:00:00 2001 From: Tomas Hajny Date: Fri, 23 Jan 2015 00:48:16 +0000 Subject: [PATCH] * align DosError returned for empty filename in GetFAttr and SetFAttr to TP/BP git-svn-id: trunk@29530 - --- rtl/os2/dos.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rtl/os2/dos.pas b/rtl/os2/dos.pas index bcad19f2bd..2ae5e416f5 100644 --- a/rtl/os2/dos.pas +++ b/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;