diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-09-27 08:13:29 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-09-27 08:13:29 +0000 |
commit | 022aa3e0eef1fd07f0e3ac3c37c91c936b5dc73f (patch) | |
tree | d384c0c8f41aef0226e55d6deda177576d1fcc36 /protocols/MSN | |
parent | 7563b8f99e988d1dd448b51d0ad6eaf57a7063b4 (diff) |
MSN: Handle case of unnamed files on transfer
git-svn-id: http://svn.miranda-ng.org/main/trunk@15455 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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;
|