- Forgot to remove the temporary download file when addition fails

This commit is contained in:
Christophe Dumez
2007-12-11 20:01:33 +00:00
parent 01b1e78dcd
commit 19f6b8491e
2 changed files with 6 additions and 0 deletions

View File

@@ -519,6 +519,7 @@ void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url, bo
// Display warning to tell user we can't decode the torrent file
if(!from_url.isNull()) {
emit invalidTorrent(from_url);
QFile::remove(file);
}else{
emit invalidTorrent(file);
}
@@ -533,6 +534,8 @@ void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url, bo
// Display warning to tell user we can't decode the torrent file
if(!from_url.isNull()) {
emit invalidTorrent(from_url);
qDebug("File path is: %s", file.toUtf8().data());
QFile::remove(file);
}else{
emit invalidTorrent(file);
}