summaryrefslogtreecommitdiff
path: root/protocols/Facebook/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Facebook/src')
-rw-r--r--protocols/Facebook/src/avatars.cpp7
-rw-r--r--protocols/Facebook/src/proto.cpp3
2 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Facebook/src/avatars.cpp b/protocols/Facebook/src/avatars.cpp
index f8fd4fb73e..43b12dcdac 100644
--- a/protocols/Facebook/src/avatars.cpp
+++ b/protocols/Facebook/src/avatars.cpp
@@ -24,12 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void FacebookProto::GetAvatarFilename(MCONTACT hContact, wchar_t *pwszFileName)
{
- wchar_t wszPath[MAX_PATH];
- mir_snwprintf(wszPath, MAX_PATH, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName);
- CreateDirectoryTreeW(wszPath);
-
+ CMStringW wszPath(GetAvatarPath());
CMStringW id(getMStringW(hContact, DBKEY_ID));
- mir_snwprintf(pwszFileName, MAX_PATH, L"%s\\%s.jpg", wszPath, id.c_str());
+ mir_snwprintf(pwszFileName, MAX_PATH, L"%s\\%s.jpg", wszPath.c_str(), id.c_str());
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp
index db2d401e21..b773e6b7b0 100644
--- a/protocols/Facebook/src/proto.cpp
+++ b/protocols/Facebook/src/proto.cpp
@@ -87,6 +87,9 @@ FacebookProto::FacebookProto(const char *proto_name, const wchar_t *username) :
m_sid = _atoi64(getMStringA(DBKEY_SID));
m_szSyncToken = getMStringA(DBKEY_SYNC_TOKEN);
+ // Avatars
+ CreateDirectoryTreeW(GetAvatarPath());
+
// Create standard network connection
NETLIBUSER nlu = {};
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;