From 3bba7578af8af3fd7fda70a4841a26be78eed638 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 18 Mar 2011 18:39:21 +0000 Subject: [PATCH] Fix torrent addition from browser --- src/torrentadditiondlg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/torrentadditiondlg.cpp b/src/torrentadditiondlg.cpp index 21c717c85..572a60e40 100644 --- a/src/torrentadditiondlg.cpp +++ b/src/torrentadditiondlg.cpp @@ -226,6 +226,11 @@ void torrentAdditionDialog::showLoadMagnetURI(QString magnet_uri) { void torrentAdditionDialog::showLoad(QString filePath, QString from_url) { is_magnet = false; + + // This is an URL to a local file, switch to local path + if(filePath.startsWith("file:", Qt::CaseInsensitive)) + filePath = QUrl(filePath).toLocalFile(); + if(!QFile::exists(filePath)) { close(); return;