diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-25 16:24:50 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-25 16:24:50 +0000 |
commit | b7ed1f2179ca045c16a007f1fabb1a44587d9426 (patch) | |
tree | 4fb707c2e202598e0bec45e3ae0b753132203ac5 /protocols/SkypeWeb | |
parent | 048e1f421b84529aa2b29da09027ce997573afd7 (diff) |
SkypeWeb: fix filename
git-svn-id: http://svn.miranda-ng.org/main/trunk@16338 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_files.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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);
|