Browse Source

* fixed checking if file is directory in Erase(File); it was broken if the directory had the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED attribute too

git-svn-id: trunk@8049 -
Vincent Snijders 18 years ago
parent
commit
9d0445a7ef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/win/sysfile.inc

+ 1 - 1
rtl/win/sysfile.inc

@@ -53,7 +53,7 @@ begin
       errno:=GetLastError;
       if errno=5 then
        begin
-         if (GetFileAttributes(p)=FILE_ATTRIBUTE_DIRECTORY) then
+         if ((GetFileAttributes(p) and FILE_ATTRIBUTE_DIRECTORY)=FILE_ATTRIBUTE_DIRECTORY) then
           errno:=2;
        end;
       Errno2InoutRes;