From ff6e9c0f9b80e2795afc10d51f10f19a1e14e75d Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 7 Nov 2009 08:29:57 +0000 Subject: [PATCH] - Check that local files exist when "skip file checking and start seeding immediately" feature is enabled. (Thanks Stephanos Antaris to notice this bug and propose a solution) --- src/torrentAddition.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/torrentAddition.h b/src/torrentAddition.h index ba0d6d8a1..83f5f1bbf 100644 --- a/src/torrentAddition.h +++ b/src/torrentAddition.h @@ -445,7 +445,15 @@ public slots: // Create .incremental file if necessary TorrentTempData::setSequential(hash, checkIncrementalDL->isChecked()); // Skip file checking and directly start seeding - TorrentTempData::setSeedingMode(hash, addInSeed->isChecked()); + if(addInSeed->isChecked()) { + // Check if local file(s) actually exist + if(savePath.exists(misc::toQString(t->name()))) { + TorrentTempData::setSeedingMode(hash, true); + } else { + QMessageBox::warning(0, tr("Seeding mode error"), tr("You chose to skip file checking. However, local files do not seem to exist in the current destionation folder. Please disable this feature or update the save path.")); + return; + } + } // Check if there is at least one selected file if(allFiltered()){ QMessageBox::warning(0, tr("Invalid file selection"), tr("You must select at least one file in the torrent"));