Prevent SetFileAttributeA from making directory read-only.

oldstable
Rein Klazes 2000-10-12 20:45:04 +00:00 committed by Alexandre Julliard
parent 5b317bc556
commit 977ec4d99d
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,11 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
}
if (attributes & FILE_ATTRIBUTE_READONLY)
{
buf.st_mode &= ~0222; /* octal!, clear write permission bits */
if(S_ISDIR(buf.st_mode))
/* FIXME */
WARN("FILE_ATTRIBUTE_READONLY ignored for directory.\n");
else
buf.st_mode &= ~0222; /* octal!, clear write permission bits */
attributes &= ~FILE_ATTRIBUTE_READONLY;
}
else