1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-01 12:35:22 +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); const QUrl url (key);
if (url.scheme () == QLatin1String ("file")) if (url.isLocalFile ())
key = QUrl::fromPercentEncoding (url.path().toUtf8()); key = url.toLocalFile ();
qApp->addTorrent (key); qApp->addTorrent (key);
} }