From dc0ad73ecade46638d18d1a72844375f3d021911 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 18 Dec 2009 16:36:48 +0000 Subject: [PATCH] - Fix torrent Labeling from torrent addition dialog --- src/bittorrent.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 58f6b1847..fdeb030e3 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -930,11 +930,12 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr h.prioritize_files(TorrentTempData::getFilesPriority(hash)); h.set_sequential_download(TorrentTempData::isSequential(hash)); } + QString label = TorrentTempData::getLabel(hash); // Save persistent data for new torrent TorrentPersistentData::saveTorrentPersistentData(h); // Save Label - if(TorrentTempData::hasTempData(hash)) { - TorrentPersistentData::saveLabel(hash, TorrentTempData::getLabel(hash)); + if(!label.isEmpty()) { + TorrentPersistentData::saveLabel(hash, label); } // Save save_path if(!defaultTempPath.isEmpty()) {