1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 21:14:33 +00:00

WebUI: Fix torrent file upload on Windows

This commit is contained in:
Christophe Dumez 2011-09-13 17:06:07 +03:00
parent 2ff28ff46f
commit 085ab0e660

View File

@ -414,6 +414,11 @@ void HttpConnection::respondCommand(QString command)
std::cerr << "I/O Error: Could not create temporary file" << std::endl; std::cerr << "I/O Error: Could not create temporary file" << std::endl;
return; 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); emit torrentReadyToBeDownloaded(filePath, false, QString(), false);
delete tmpfile; delete tmpfile;
// Prepare response // Prepare response