summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-25 18:47:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-25 18:47:46 +0000
commitd51b6688a7132d6f5d355aae5ccb7aa7fdab4b74 (patch)
treecf882f3d71dcde7830fe5714f483b4d85412821a
parent1fdcb0e5ceda9b53334b322093df879b8ff52799 (diff)
downloadtdenetwork-d51b6688a7132d6f5d355aae5ccb7aa7fdab4b74.tar.gz
tdenetwork-d51b6688a7132d6f5d355aae5ccb7aa7fdab4b74.zip
Should fix empty temp files being left around
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1107469 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kopete/protocols/msn/incomingtransfer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/kopete/protocols/msn/incomingtransfer.cpp b/kopete/protocols/msn/incomingtransfer.cpp
index 99422ef7..d6a89f38 100644
--- a/kopete/protocols/msn/incomingtransfer.cpp
+++ b/kopete/protocols/msn/incomingtransfer.cpp
@@ -177,6 +177,9 @@ void IncomingTransfer::processMessage(const Message& message)
else if(message.header.dataSize == 4 && message.applicationIdentifier == 1)
{
// Data preparation message.
+ if (m_tempFile.name.isEmpty() == false) {
+ QFile::remove(m_tempFile.name());
+ }
m_tempFile = new KTempFile(locateLocal("tmp", "msnpicture--"), ".png");
m_tempFile->setAutoDelete(true);
m_file = m_tempFile->file();