From 40686cc1869953a42f311b6d8a3558e99acef37d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 16 Feb 2020 14:35:10 +0300 Subject: useless checks removed --- protocols/Tox/src/tox_avatars.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'protocols/Tox') diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index 0a255512a0..ca5c7d40a5 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -4,10 +4,7 @@ wchar_t* CToxProto::GetAvatarFilePath(MCONTACT hContact) { wchar_t *path = (wchar_t*)mir_calloc(MAX_PATH * sizeof(wchar_t) + 1); mir_snwprintf(path, MAX_PATH, L"%s\\%S", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName); - - DWORD dwAttributes = GetFileAttributes(path); - if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) - CreateDirectoryTreeW(path); + CreateDirectoryTreeW(path); ptrW address(getWStringA(hContact, TOX_SETTINGS_ID)); if (address == NULL) { -- cgit v1.2.3