Browse Source

Merge pull request #215 from sledgehammer999/create_torrent

Open stream in binary mode. Fixes issue #161
adaptive-webui-19844
Christophe Dumez 12 years ago
parent
commit
634be0012f
  1. 2
      src/torrentcreator/torrentcreatorthread.cpp

2
src/torrentcreator/torrentcreatorthread.cpp

@ -129,7 +129,7 @@ void TorrentCreatorThread::run() { @@ -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…
Cancel
Save