mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
- BUGFIX: Make sure scan folder is different than qBittorrent backup directory to avoid torrents deletion
This commit is contained in:
@@ -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 <chris@qbittorrent.org> - v1.5.4
|
||||
- BUGFIX: Updated man page
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user