mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr,file] handle FILE_ATTRIBUTE_NORMAL in SetFileAttributesA
This commit is contained in:
@@ -612,11 +612,11 @@ BOOL SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
#ifdef WINPR_HAVE_FCNTL_H
|
||||
if (dwFileAttributes & ~FILE_ATTRIBUTE_READONLY)
|
||||
const uint32_t mask = ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_NORMAL);
|
||||
if (dwFileAttributes & mask)
|
||||
{
|
||||
char buffer[8192] = { 0 };
|
||||
const char* flags =
|
||||
flagsToStr(buffer, sizeof(buffer), dwFileAttributes & ~FILE_ATTRIBUTE_READONLY);
|
||||
const char* flags = flagsToStr(buffer, sizeof(buffer), dwFileAttributes & mask);
|
||||
WLog_WARN(TAG, "Unsupported flags %s, ignoring!", flags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user