rendered paste body=== modified file 'dcpp/DownloadManager.cpp'
--- dcpp/DownloadManager.cpp 2008-03-01 23:16:58 +0000
+++ dcpp/DownloadManager.cpp 2008-04-01 19:08:07 +0000
@@ -334,12 +334,17 @@
}
#endif
if(BOOLSETTING(LOG_DOWNLOADS) && (BOOLSETTING(LOG_FILELIST_TRANSFERS) || d->getType() == Transfer::TYPE_FILE)) {
- logDownload(aSource, d);
+ // Check whether the entire file is complete
+ if(QueueManager::getInstance()->getSize(d->getPath().c_str()) == d->getPos())
+ logDownload(aSource, d);
}
}
removeDownload(d);
- fire(DownloadManagerListener::Complete(), d);
+
+ // Check whether the entire file is complete
+ if(QueueManager::getInstance()->getSize(d->getPath().c_str()) == d->getPos())
+ fire(DownloadManagerListener::Complete(), d);
QueueManager::getInstance()->putDownload(d, true);
checkDownloads(aSource);