summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_avatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-02-16 14:35:10 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-02-16 14:35:10 +0300
commit40686cc1869953a42f311b6d8a3558e99acef37d (patch)
tree7e6b0d69261ddbfb0aa82535a20eeaf5159103a0 /protocols/Tox/src/tox_avatars.cpp
parent1513340956911f3e3efc252bc1a0bae046dc8d3e (diff)
useless checks removed
Diffstat (limited to 'protocols/Tox/src/tox_avatars.cpp')
-rw-r--r--protocols/Tox/src/tox_avatars.cpp5
1 files changed, 1 insertions, 4 deletions
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) {