diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-02 16:36:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-02 16:36:33 +0000 |
commit | 378f61eacc8338f52f1eea336c0f1226e33485bc (patch) | |
tree | 51815d2aae8a7178b052a75e163aed277280535c /protocols | |
parent | e27c47eb062d54f15846ce95bbcd3f6218ca4ab7 (diff) |
fix for registering relative avatar path in Facebook
git-svn-id: http://svn.miranda-ng.org/main/trunk@3843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/avatars.cpp | 5 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index 81907dabe9..3285bd2e89 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -130,8 +130,9 @@ std::tstring FacebookProto::GetAvatarFolder() TCHAR path[MAX_PATH];
if ( hAvatarFolder_ && FoldersGetCustomPathT(hAvatarFolder_, path, SIZEOF(path), _T("")) == 0 )
return path;
- else
- return def_avatar_folder_;
+
+ mir_sntprintf(path, SIZEOF(path), _T("%s\\%s"), (TCHAR*)VARST( _T("%miranda_avatarcache%")), m_tszUserName);
+ return path;
}
int FacebookProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam)
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 46c9637566..b6e76229d5 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -70,8 +70,8 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username) SkinAddNewSoundExT( "NewsFeed", m_tszUserName, LPGENT( "News Feed" ));
SkinAddNewSoundExT( "OtherEvent", m_tszUserName, LPGENT( "Other Event" ));
- def_avatar_folder_ = std::tstring( VARST( _T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName;
- hAvatarFolder_ = FoldersRegisterCustomPathT("Avatars", m_szModuleName, def_avatar_folder_.c_str(), m_tszUserName);
+ mir_sntprintf(descr, SIZEOF(descr), _T("%%miranda_avatarcache%%\\%s"), m_tszUserName);
+ hAvatarFolder_ = FoldersRegisterCustomPathT("Avatars", m_szModuleName, descr, m_tszUserName);
// Set all contacts offline -- in case we crashed
SetAllContactStatuses( ID_STATUS_OFFLINE, true );
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 878ad9aa39..41bf2e513e 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -198,7 +198,6 @@ public: HANDLE m_hNetlibUser;
std::string last_status_msg_;
- std::tstring def_avatar_folder_;
HANDLE hAvatarFolder_;
HANDLE hSmileysFolder_;
std::vector<HANDLE> avatar_queue;
|