filename = filename_buffer;
#endif
+ // First check for a normal file with the old-style readonly bit
+ attributes = GetFileAttributes(filename);
+ if (FILE_ATTRIBUTE_READONLY == (attributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_READONLY)))
+ return 0;
+
/* Win32 prototype lacks const. */
error = GetNamedSecurityInfo((LPTSTR)filename, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION,