From 5df94ab3e57398bf6ae510e14e49b726e705fae3 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Wed, 26 Mar 2014 10:12:57 +0000 Subject: NewsAggregator avatar fix (by Mataes) git-svn-id: http://svn.miranda-ng.org/main/trunk@8755 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/CheckFeed.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/NewsAggregator/Src/CheckFeed.cpp') diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index e235c3d159..16dac94943 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -177,10 +177,12 @@ VOID CheckCurrentFeed(MCONTACT hContact) if (!db_get_ts(hContact, MODULE, "Nick", &dbVar)) { TCHAR *ext = _tcsrchr((TCHAR *)url, _T('.')) + 1; - pai.format = ProtoGetAvatarFormat(ext); + pai.format = ProtoGetAvatarFormat(url); TCHAR *filename = dbVar.ptszVal; + StrReplace(_T("/"), _T("_"), filename); mir_sntprintf(pai.filename, SIZEOF(pai.filename), _T("%s\\%s.%s"), tszRoot, filename, ext); + CreateDirectoryTreeT(tszRoot); if (DownloadFile(url, pai.filename)) { db_set_ts(hContact, MODULE, "ImagePath", pai.filename); ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE) &pai, NULL); -- cgit v1.2.3