From b7ed1f2179ca045c16a007f1fabb1a44587d9426 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Thu, 25 Feb 2016 16:24:50 +0000 Subject: SkypeWeb: fix filename git-svn-id: http://svn.miranda-ng.org/main/trunk@16338 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_files.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/SkypeWeb/src') diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp index e3a68d8bf6..d6c1d38f02 100644 --- a/protocols/SkypeWeb/src/skype_files.cpp +++ b/protocols/SkypeWeb/src/skype_files.cpp @@ -26,8 +26,8 @@ void CSkypeProto::SendFileThread(void *p) } ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)fup); - - SendRequest(new ASMObjectCreateRequest(li, CMStringA(FORMAT, "%d:%s", isChatRoom(fup->hContact) ? 19 : 8, ptrA(getStringA(fup->hContact, SKYPE_SETTINGS_ID))), T2Utf(fup->tszFileName)), &CSkypeProto::OnASMObjectCreated, fup); + T2Utf uszFileName(fup->tszFileName); + SendRequest(new ASMObjectCreateRequest(li, CMStringA(FORMAT, "%d:%s", isChatRoom(fup->hContact) ? 19 : 8, ptrA(getStringA(fup->hContact, SKYPE_SETTINGS_ID))), strrchr((const char*)uszFileName + 1, '\\')), &CSkypeProto::OnASMObjectCreated, fup); } void CSkypeProto::OnASMObjectCreated(const NETLIBHTTPREQUEST *response, void *arg) @@ -63,6 +63,7 @@ void CSkypeProto::OnASMObjectCreated(const NETLIBHTTPREQUEST *response, void *ar fup->size = lBytes; ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)fup); SendRequest(new ASMObjectUploadRequest(li, strObjectId.c_str(), pData, lBytes), &CSkypeProto::OnASMObjectUploaded, fup); + fclose(pFile); } } @@ -75,7 +76,7 @@ void CSkypeProto::OnASMObjectUploaded(const NETLIBHTTPREQUEST *response, void *a return; } - TCHAR *tszFile = fup->tszFileName; + TCHAR *tszFile = _tcsrchr(fup->tszFileName, L'\\') + 1; HXML xml = xmlCreateNode(L"URIObject", nullptr, 0); xmlAddChild(xml, L"Title", tszFile); -- cgit v1.2.3