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/SkypeWeb/src/skype_avatars.cpp | 6 +----- protocols/SkypeWeb/src/skype_proto.cpp | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 82ffb3ca73..b7e01445d5 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -123,11 +123,7 @@ INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam) void CSkypeProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t cbLen) { int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%s", VARSW(L"%miranda_avatarcache%").get(), m_tszUserName); - - DWORD dwAttributes = GetFileAttributes(pszDest); - if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) - CreateDirectoryTreeW(pszDest); - + CreateDirectoryTreeW(pszDest); pszDest[tPathLen++] = '\\'; const wchar_t* szFileType = ProtoGetAvatarExtension(getByte(hContact, "AvatarType", PA_FORMAT_JPEG)); diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 6ebe23a08d..3bc30f8b42 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -50,9 +50,7 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) : HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CSkypeProto::OnDbEventRead); m_tszAvatarFolder = std::wstring(VARSW(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName; - DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str()); - if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) - CreateDirectoryTreeW(m_tszAvatarFolder.c_str()); + CreateDirectoryTreeW(m_tszAvatarFolder.c_str()); //sounds g_plugin.addSound("skype_inc_call", L"SkypeWeb", LPGENW("Incoming call")); -- cgit v1.2.3