mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 09:43:07 -07:00
- Saving trackers file only when necessary
- Avoid code duplication for showProperties()
This commit is contained in:
parent
f3f3f2822b
commit
c8b944508b
5 changed files with 11 additions and 14 deletions
|
@ -858,8 +858,6 @@ void bittorrent::saveFastResumeAndRatioData() {
|
|||
}
|
||||
// Save ratio data
|
||||
saveDownloadUploadForTorrent(hash);
|
||||
// Save trackers
|
||||
saveTrackerFile(hash);
|
||||
}
|
||||
}
|
||||
qDebug("Fast resume and ratio data saved");
|
||||
|
@ -1005,6 +1003,7 @@ bool bittorrent::loadTrackerFile(QString hash) {
|
|||
}
|
||||
|
||||
void bittorrent::saveTrackerFile(QString hash) {
|
||||
qDebug("Saving tracker file for %s", hash.toUtf8().data());
|
||||
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
|
||||
QFile tracker_file(torrentBackup.path()+QDir::separator()+ hash + ".trackers");
|
||||
if(tracker_file.exists()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue