From 8bf29f17084b129f4ca0b57ae67251b62747a7ca Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Sun, 28 Mar 1999 13:40:52 +0000 Subject: [PATCH] SetFileAttributesA: "implemented" setting of directory flag as test of compatibility. --- win32/file.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/win32/file.c b/win32/file.c index c06744f7fad..da22d01e114 100644 --- a/win32/file.c +++ b/win32/file.c @@ -88,6 +88,13 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes) /* add write permission */ buf.st_mode |= 0600 | ((buf.st_mode & 044) >> 1); } + if (attributes & FILE_ATTRIBUTE_DIRECTORY) + { + if (!S_ISDIR(buf.st_mode)) + FIXME(file,"SetFileAttributes expected the file '%s' to be a directory", + lpFileName); + attributes &= ~FILE_ATTRIBUTE_DIRECTORY; + } attributes &= ~(FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM); if (attributes) FIXME(file,"(%s):%lx attribute(s) not implemented.\n",