mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Open stream in binary mode. Fixes issue #161
This commit is contained in:
parent
76f959599f
commit
7d1e2e2b2a
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ void TorrentCreatorThread::run() {
|
|||
if (abort) return;
|
||||
// create the torrent and print it to out
|
||||
qDebug("Saving to %s", qPrintable(save_path));
|
||||
std::ofstream outfile(save_path.toLocal8Bit().constData());
|
||||
std::ofstream outfile(save_path.toLocal8Bit().constData(), std::ios_base::out|std::ios_base::binary);
|
||||
if (outfile.fail())
|
||||
throw std::exception();
|
||||
bencode(std::ostream_iterator<char>(outfile), t.generate());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue