------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=132102
andre duffeck de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From andre duffeck de 2006-09-11 11:41 -------
SVN commit 582998 by duffeck:
Create directories if they don't already exists.
BUG: 132102
M +14 -0 yahooaccount.cpp
--- branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo/yahooaccount.cpp
#582997:582998
@ -26,6 +26,8 @
#include <qregexp.h>
#include <qimage.h>
#include <qfile.h>
+#include <qdir.h>
+#include <qfileinfo.h>
// KDE
#include <klocale.h>
@ -1378,6 +1380,18 @
return;
m_pendingFileTransfers.remove( transfer->info().internalId() );
+
+ //Create directory if it doesn't already exist
+ QDir dir;
+ QString path = QFileInfo( fileName ).dirPath();
+ for( int i = 1; i <= path.contains('/'); ++i )
+ {
+ if( !dir.exists( path.section( '/', 0, i ) ) )
+ {
+ dir.mkdir( path.section( '/', 0, i) );
+ }
+ }
+
m_session->receiveFile( transfer->info().transferId(),
transfer->info().contact()->contactId(), transfer->info().internalId(),
fileName );
m_fileTransfers.insert( transfer->info().transferId(), transfer );
QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this,
SLOT(slotFileTransferResult( KIO::Job * )) );
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel