From cab38857d1b080d4132136c5e3484bec7b340b6b Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 21 Jan 2010 20:39:43 +0000 Subject: [PATCH] BUGFIX: Force a recheck after renaming files to avoid overwriting --- Changelog | 1 + src/bittorrent.cpp | 2 ++ src/propertieswidget.cpp | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/Changelog b/Changelog index 8c5ce7399..03e8f0e7b 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ * Unreleased - Christophe Dumez - v2.1.2 - BUGFIX: Fix overwrite check when renaming a folder in a torrent + - BUGFIX: Force a recheck after renaming files to avoid overwriting * Wed Jan 20 2010 - Christophe Dumez - v2.1.1 - BUGFIX: Fix compilation with Qt4.4 diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 48e386fb7..3bc926a7a 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1028,6 +1028,8 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr QString path = files_path.at(i); h.rename_file(i, path); } + // Force recheck + h.force_recheck(); } } QString label = TorrentTempData::getLabel(hash); diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index 671f80026..7f6cf6d53 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -578,6 +578,8 @@ void PropertiesWidget::renameSelectedFile() { } qDebug("Renaming %s to %s", old_name.toLocal8Bit().data(), new_name.toLocal8Bit().data()); h.rename_file(file_index, new_name); + // Force recheck + h.force_recheck(); // Rename if torrent files model too if(new_name_last.endsWith(".!qB")) new_name_last.chop(4); @@ -621,6 +623,8 @@ void PropertiesWidget::renameSelectedFile() { h.rename_file(i, new_name); } } + // Force recheck + h.force_recheck(); // Rename folder in torrent files model too PropListModel->setData(index, new_name_last); // Remove old folder