diff --git a/Changelog b/Changelog index fcf74204d..808f3a464 100644 --- a/Changelog +++ b/Changelog @@ -16,6 +16,7 @@ - BUGFIX: Fixed deletion from hard drive (failed for non-empty folders) - BUGFIX: qBittorrent now identifies its version correctly on the network - BUGFIX: Preventing GUI from freezing when deleting a download permanently + - BUGFIX: Fix directory scanning (stop trying to download the same files several times) - COSMETIC: Replaced OSD messages by systray messages * Tue Nov 28 2006 - Christophe Dumez - v0.8.0 diff --git a/src/GUI.cpp b/src/GUI.cpp index 13ea09209..3004e4c8a 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -1303,11 +1303,6 @@ void GUI::addTorrent(const QString& path, bool fromScanDir, const QString& from_ if(scan_dir.at(scan_dir.length()-1) != QDir::separator()){ scan_dir += QDir::separator(); } - //rename torrent file to match file name and find it easily later - dest_file = scan_dir+hash.toUtf8()+".torrent"; - if(!QFile::exists(dest_file)){ - QFile::rename(file, dest_file); - } } // Adding torrent to download list DLListModel->insertRow(row); @@ -1342,6 +1337,10 @@ void GUI::addTorrent(const QString& path, bool fromScanDir, const QString& from_ // remove temporary file QFile::remove(file); } + // Delete from scan dir to avoid trying to download it again + if(fromScanDir){ + QFile::remove(file); + } // Update info Bar if(!fastResume){ if(!from_url.isNull()){