mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
httpconnection: Make sure torrent file is written in binary mode
This commit is contained in:
parent
102e25771c
commit
9115a2ddc2
1 changed files with 2 additions and 0 deletions
|
@ -402,6 +402,8 @@ void HttpConnection::respondCommand(const QString& command) {
|
|||
// it fails to load on Windows.
|
||||
QTemporaryFile *tmpfile = new QTemporaryFile (QDir::temp().absoluteFilePath("qBT-XXXXXX.torrent"));
|
||||
if (tmpfile->open()) {
|
||||
// Make sure we are writing in binary mode
|
||||
tmpfile->setTextModeEnabled(false);
|
||||
tmpfile->write(m_parser.torrent());
|
||||
tmpfile->close();
|
||||
emit torrentReadyToBeDownloaded(tmpfile->fileName(), false, QString(), false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue