1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-29 11:06:23 +00:00

Fix dropping .torrent files into main window on Windows

Previously used `QUrl::fromPercentEncoding()` leads to paths like
"/C:/test/a.torrent" which obviously aren't valid filesystem paths.
This commit is contained in:
Mike Gelfand 2016-03-15 06:04:49 +00:00
parent c955c04d8f
commit cc1f6f3a5c

View file

@ -1444,8 +1444,8 @@ MainWindow::dropEvent (QDropEvent * event)
{
const QUrl url (key);
if (url.scheme () == QLatin1String ("file"))
key = QUrl::fromPercentEncoding (url.path().toUtf8());
if (url.isLocalFile ())
key = url.toLocalFile ();
qApp->addTorrent (key);
}