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:
parent
c955c04d8f
commit
cc1f6f3a5c
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue