mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
WebUI: Fix torrent file upload on Windows
This commit is contained in:
parent
2ff28ff46f
commit
085ab0e660
1 changed files with 5 additions and 0 deletions
|
@ -414,6 +414,11 @@ void HttpConnection::respondCommand(QString command)
|
|||
std::cerr << "I/O Error: Could not create temporary file" << std::endl;
|
||||
return;
|
||||
}
|
||||
#ifdef Q_WS_WIN
|
||||
// Change extension to .torrent on Windows or loading will fail
|
||||
QFile::rename(filePath, filePath+".torrent");
|
||||
filePath += ".torrent";
|
||||
#endif
|
||||
emit torrentReadyToBeDownloaded(filePath, false, QString(), false);
|
||||
delete tmpfile;
|
||||
// Prepare response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue