mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
BUGFIX: Fix directory scanning (stop trying to download the same files several times)
This commit is contained in:
@@ -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()){
|
||||
|
||||
Reference in New Issue
Block a user