projects
/
fms.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version 0.2.13
[fms.git]
/
src
/
message.cpp
diff --git
a/src/message.cpp
b/src/message.cpp
index
c0bed87
..
d7aaf3f
100644
(file)
--- a/
src/message.cpp
+++ b/
src/message.cpp
@@
-696,8
+696,9
@@
const bool Message::ParseNNTPMessage(const std::string &nntpmessage)
m_body+=bodypart;
\r
}
\r
// add a binary file attachment
\r
m_body+=bodypart;
\r
}
\r
// add a binary file attachment
\r
- else if((
*i)->GetName()!=""
&& (*i)->GetLength()>0 && (*i)->GetContent())
\r
+ else if((
(*i)->GetName()!="" || (*i)->GetFilename()!="")
&& (*i)->GetLength()>0 && (*i)->GetContent())
\r
{
\r
{
\r
+ std::string filename="";
\r
std::string contenttype="";
\r
std::vector<unsigned char> data((*i)->GetContent(),(*i)->GetContent()+(*i)->GetContentLength());
\r
if((*i)->GetContentType())
\r
std::string contenttype="";
\r
std::vector<unsigned char> data((*i)->GetContent(),(*i)->GetContent()+(*i)->GetContentLength());
\r
if((*i)->GetContentType())
\r
@@
-710,7
+711,12
@@
const bool Message::ParseNNTPMessage(const std::string &nntpmessage)
contenttype.erase(endpos);
\r
}
\r
}
\r
contenttype.erase(endpos);
\r
}
\r
}
\r
- m_fileattachments.push_back(fileattachment((*i)->GetName(),contenttype,data));
\r
+ filename=(*i)->GetFilename();
\r
+ if(filename=="")
\r
+ {
\r
+ filename=(*i)->GetName();
\r
+ }
\r
+ m_fileattachments.push_back(fileattachment(filename,contenttype,data));
\r
}
\r
}
\r
\r
}
\r
}
\r
\r