From 022aa3e0eef1fd07f0e3ac3c37c91c936b5dc73f Mon Sep 17 00:00:00 2001 From: Piotr Piastucki Date: Sun, 27 Sep 2015 08:13:29 +0000 Subject: MSN: Handle case of unnamed files on transfer git-svn-id: http://svn.miranda-ng.org/main/trunk@15455 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn_commands.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols') diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index f980b116fb..38539e0658 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -474,6 +474,12 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli) if ((originalName = ezxml_child(xmli, "meta"))) pszFile = (char*)ezxml_attr(originalName, "originalName"); } + if (!pszFile || !*pszFile) { + if ((originalName = ezxml_child(xmli, "meta")) && (pszFile = (char*)ezxml_attr(originalName, "type"))) { + if (!mir_strcmp(pszFile, "photo")) pszFile="IMG00001.JPG"; + } + if (!pszFile || !*pszFile) pszFile="file"; + } ft->std.tszCurrentFile = mir_utf8decodeT(pszFile); ft->std.totalBytes = ft->std.currentFileSize = fileSize; ft->std.totalFiles = 1; -- cgit v1.2.3