mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Fix torrent loading problem from Web UI on Windows.
This commit is contained in:
parent
9cff66df3f
commit
76ca967d70
3 changed files with 12 additions and 10 deletions
|
@ -989,9 +989,10 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
|
|||
t = new torrent_info(path.toUtf8().constData());
|
||||
if(!t->is_valid())
|
||||
throw std::exception();
|
||||
} catch(std::exception&) {
|
||||
} catch(std::exception& e) {
|
||||
if(!from_url.isNull()) {
|
||||
addConsoleMessage(tr("Unable to decode torrent file: '%1'", "e.g: Unable to decode torrent file: '/home/y/xxx.torrent'").arg(from_url), QString::fromUtf8("red"));
|
||||
addConsoleMessage(QString::fromLocal8Bit(e.what()), "red");
|
||||
//emit invalidTorrent(from_url);
|
||||
misc::safeRemove(path);
|
||||
}else{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue