diff --git a/Changelog b/Changelog index 6aca7351d..0e780d2d2 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,7 @@ - BUGFIX: Fix crash on torrent addition (if libtorrent-rasterbar has debug enabled) - BUGFIX: Fix trackers addition to torrents (bug introduced in v1.5.4) - BUGFIX: Suppress compilation warning regarding sortNewsList() not being used + - BUGFIX: Make sure scan folder is different than qBittorrent backup directory to avoid torrents deletion * Sun Oct 25 2009 - Christophe Dumez - v1.5.4 - BUGFIX: Updated man page diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 4798a7a28..764dc6ca2 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -982,6 +982,12 @@ void bittorrent::scanDirectory(QString scan_dir) { FSMutex->lock(); qDebug("Scanning directory: %s", scan_dir.toLocal8Bit().data()); QDir dir(scan_dir); + QDir torrentBackup(misc::qBittorrentPath() + "BT_backup"); + // Check that scan dir is not BT_backup (silly but who knows...) + if(dir == torrentBackup) { + std::cerr << "Scan directory cannot be qBittorrent backup folder!" << std::endl; + return; + } QStringList filters; filters << "*.torrent"; QStringList files = dir.entryList(filters, QDir::Files, QDir::Unsorted);