Commit 977ec4d9 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

Prevent SetFileAttributeA from making directory read-only.

parent 5b317bc5
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment