diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-16 14:35:10 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-16 14:35:10 +0300 |
commit | 40686cc1869953a42f311b6d8a3558e99acef37d (patch) | |
tree | 7e6b0d69261ddbfb0aa82535a20eeaf5159103a0 /protocols/JabberG | |
parent | 1513340956911f3e3efc252bc1a0bae046dc8d3e (diff) |
useless checks removed
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-x | protocols/JabberG/src/jabber_misc.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 4d96430685..2e861fcb2d 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -135,11 +135,9 @@ BOOL CJabberProto::AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType) void CJabberProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t cbLen)
{
- int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%S", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
+ size_t tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%S", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
- DWORD dwAttributes = GetFileAttributesW(pszDest);
- if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
- CreateDirectoryTreeW(pszDest);
+ CreateDirectoryTreeW(pszDest);
pszDest[tPathLen++] = '\\';
@@ -476,9 +474,7 @@ void CJabberProto::OnGetBob(const TiXmlElement *node, CJabberIqInfo *pReq) if (auto *cid = XmlGetAttr(data, "cid")) {
if (auto *src = data->GetText()) {
VARSW wszTempPath(L"%miranda_userdata%\\JabberTmp");
- DWORD dwAttributes = GetFileAttributesW(wszTempPath);
- if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
- CreateDirectoryTreeW(wszTempPath);
+ CreateDirectoryTreeW(wszTempPath);
const wchar_t *pwszExt = L".bin";
if (auto *pszType = XmlGetAttr(data, "type"))
|