mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Fix possible crash with folder watching
This commit is contained in:
@@ -281,12 +281,14 @@ void Bittorrent::configureSession() {
|
||||
startTorrentsInPause(Preferences::addTorrentsInPause());
|
||||
// * Scan dirs
|
||||
const QStringList &scan_dirs = Preferences::getScanDirs();
|
||||
foreach (const QString &dir, scan_dirs) {
|
||||
m_scanFolders->addPath(dir);
|
||||
QVariantList downloadInDirList = Preferences::getDownloadInScanDirs();
|
||||
while(scan_dirs.size() > downloadInDirList.size()) {
|
||||
downloadInDirList << QVariant(false);
|
||||
}
|
||||
const QVariantList &downloadInDirList = Preferences::getDownloadInScanDirs();
|
||||
for (int i = 0; i < downloadInDirList.count(); ++i) {
|
||||
m_scanFolders->setDownloadAtPath(i, downloadInDirList.at(i).toBool());
|
||||
int i = 0;
|
||||
foreach (const QString &dir, scan_dirs) {
|
||||
m_scanFolders->addPath(dir, downloadInDirList.at(i).toBool());
|
||||
++i;
|
||||
}
|
||||
// * Export Dir
|
||||
const bool newTorrentExport = Preferences::isTorrentExportEnabled();
|
||||
|
||||
Reference in New Issue
Block a user