Browse Source

Another fix for torrent addition from Web browser

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
536bd85fd0
  1. 2
      src/qtlibtorrent/qbtsession.cpp
  2. 2
      src/torrentadditiondlg.cpp

2
src/qtlibtorrent/qbtsession.cpp

@ -893,7 +893,7 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr @@ -893,7 +893,7 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
if(QFile::rename(path, path+".torrent")) path += ".torrent";
#endif
if(path.startsWith("file:", Qt::CaseInsensitive))
path = QUrl(path).toLocalFile();
path = QUrl::fromEncoded(path.toLocal8Bit()).toLocalFile();
if(path.isEmpty()) return h;
Q_ASSERT(!misc::isUrl(path));

2
src/torrentadditiondlg.cpp

@ -229,7 +229,7 @@ void torrentAdditionDialog::showLoad(QString filePath, QString from_url) { @@ -229,7 +229,7 @@ void torrentAdditionDialog::showLoad(QString filePath, QString from_url) {
// This is an URL to a local file, switch to local path
if(filePath.startsWith("file:", Qt::CaseInsensitive))
filePath = QUrl(filePath).toLocalFile();
filePath = QUrl::fromEncoded(filePath.toLocal8Bit()).toLocalFile();
if(!QFile::exists(filePath)) {
close();

Loading…
Cancel
Save