summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleecher1337 <leecher@dose.0wnz.at>2018-05-03 08:54:42 +0200
committerleecher1337 <leecher@dose.0wnz.at>2018-05-03 08:54:42 +0200
commit89a1dbcab6947a68d81dd048e5d91cebdb0c2510 (patch)
tree1751ae2d693d22120f41a68de291c7edf7408847
parent60f784e1b50f0052fe2de96347887ad20cef415a (diff)
MSN: Strip path from filename, if path was supplied
-rw-r--r--protocols/MSN/src/msn_commands.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 639cef5596..5b0e0cd946 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -432,7 +432,11 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli)
mir_free(ft->std.szCurrentFile.w);
if (!((originalName = ezxml_child(xmli, "OriginalName")) && (pszFile = (char*)ezxml_attr(originalName, "v")))) {
if ((originalName = ezxml_child(xmli, "meta")))
+ {
+ char *p;
pszFile = (char*)ezxml_attr(originalName, "originalName");
+ if ((p=strrchr(pszFile, '\\')) || (p=strrchr(pszFile, '/'))) pszFile=p+1;
+ }
}
if (!pszFile || !*pszFile) {
if ((originalName = ezxml_child(xmli, "meta")) && (pszFile = (char*)ezxml_attr(originalName, "type"))) {