Berend Reitsma <berend at asset-control.com>

SetFileAttributes32A changed to make file writeable when
FILE_ATTRIBUTE_READONLY is not set.
This commit is contained in:
Alexandre Julliard 1999-01-30 12:51:57 +00:00
parent 9c77b4747f
commit e1d19f36f8

View File

@ -84,6 +84,11 @@ BOOL32 WINAPI SetFileAttributes32A(LPCSTR lpFileName, DWORD attributes)
buf.st_mode &= ~0222; /* octal!, clear write permission bits */ buf.st_mode &= ~0222; /* octal!, clear write permission bits */
attributes &= ~FILE_ATTRIBUTE_READONLY; attributes &= ~FILE_ATTRIBUTE_READONLY;
} }
else
{
/* add write permission */
buf.st_mode |= 0600 | ((buf.st_mode & 044) >> 1);
}
attributes &= ~(FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM); attributes &= ~(FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM);
if (attributes) if (attributes)
FIXME(file,"(%s):%lx attribute(s) not implemented.\n", FIXME(file,"(%s):%lx attribute(s) not implemented.\n",