diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 67f34aed9..ea5440da7 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1824,24 +1824,25 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { } } bool was_already_seeded = TorrentPersistentData::isSeed(hash); - if(!was_already_seeded) + if(!was_already_seeded) { h.save_resume_data(); - // Check if there are torrent files inside - for(int i=0; i t; - try { - t = new torrent_info(torrent_fullpath.toLocal8Bit().data()); - QString sub_hash = misc::toQString(t->info_hash()); - // Passing the save path along to the sub torrent file - TorrentTempData::setSavePath(sub_hash, h.save_path()); - addTorrent(torrent_fullpath); - } catch(std::exception&) { - qDebug("Caught error loading torrent"); - addConsoleMessage(tr("Unable to decode %1 torrent file.").arg(torrent_fullpath), QString::fromUtf8("red")); + // Check if there are torrent files inside + for(int i=0; i t; + try { + t = new torrent_info(torrent_fullpath.toLocal8Bit().data()); + QString sub_hash = misc::toQString(t->info_hash()); + // Passing the save path along to the sub torrent file + TorrentTempData::setSavePath(sub_hash, h.save_path()); + addTorrent(torrent_fullpath); + } catch(std::exception&) { + qDebug("Caught error loading torrent"); + addConsoleMessage(tr("Unable to decode %1 torrent file.").arg(torrent_fullpath), QString::fromUtf8("red")); + } } } }