mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Fix unhandled exception when trying to create torrents from files/folder in disk root.
This commit is contained in:
committed by
Christophe Dumez
parent
5dc3f3bf3e
commit
4a05e100b7
@@ -38,6 +38,7 @@
|
|||||||
#include <libtorrent/file_pool.hpp>
|
#include <libtorrent/file_pool.hpp>
|
||||||
#include <libtorrent/create_torrent.hpp>
|
#include <libtorrent/create_torrent.hpp>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
#include "torrentcreatorthread.h"
|
#include "torrentcreatorthread.h"
|
||||||
#include "fs_utils.h"
|
#include "fs_utils.h"
|
||||||
@@ -118,7 +119,7 @@ void TorrentCreatorThread::run() {
|
|||||||
}
|
}
|
||||||
if (abort) return;
|
if (abort) return;
|
||||||
// calculate the hash for all pieces
|
// calculate the hash for all pieces
|
||||||
const QString parent_path = fsutils::branchPath(input_path);
|
const QString parent_path = fsutils::branchPath(input_path) + QDir::separator();
|
||||||
set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), this));
|
set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), this));
|
||||||
// Set qBittorrent as creator and add user comment to
|
// Set qBittorrent as creator and add user comment to
|
||||||
// torrent_info structure
|
// torrent_info structure
|
||||||
|
|||||||
Reference in New Issue
Block a user