Commit 60ecb440 authored by Wolfgang Bauer's avatar Wolfgang Bauer

Reactivate commented out code in DataSourceFactory::checkLocalFile()

This code is needed because it creates the (empty) destination file.
Without it, KIO::open() in DataSourceFactory::start() will always fail,
and the downloads never start.

In particular, the multisegmentkio plugin works again now.
parent 237463ce
...@@ -161,13 +161,13 @@ void DataSourceFactory::slotFinishedDownload(TransferDataSource *source, KIO::fi ...@@ -161,13 +161,13 @@ void DataSourceFactory::slotFinishedDownload(TransferDataSource *source, KIO::fi
m_speedTimer->stop(); m_speedTimer->stop();
m_finished = true; m_finished = true;
} }
//FIXME is this even needed
bool DataSourceFactory::checkLocalFile() bool DataSourceFactory::checkLocalFile()
{ {
QString dest_orig = m_dest.toLocalFile(); QString dest_orig = m_dest.toLocalFile();
QString _dest_part(dest_orig); QString _dest_part(dest_orig);
/*KDE_struct_stat buff_part; KDE_struct_stat buff_part;
bool bPartExists = (KDE::stat( _dest_part, &buff_part ) != -1); bool bPartExists = (KDE::stat( _dest_part, &buff_part ) != -1);
if(!bPartExists) if(!bPartExists)
{ {
...@@ -185,7 +185,7 @@ bool DataSourceFactory::checkLocalFile() ...@@ -185,7 +185,7 @@ bool DataSourceFactory::checkLocalFile()
{ {
close(fd); close(fd);
} }
}*///TODO: Port if needed }//TODO: Port to use Qt functions maybe
qCDebug(KGET_DEBUG) << "success"; qCDebug(KGET_DEBUG) << "success";
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment