Skip to content

Commit 95c0cda

Browse files
committed
DownloadManager: write binary files.
Keeps Windows from screwing up the line endings, which messes with the checksum of the file.
1 parent e1b581b commit 95c0cda

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

threaded-libcurl/DownloadManager.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class DownloadManager {
99
unsigned int finishedCount = 0, addedCount = 0, failedCount = 0;
1010

1111
public:
12-
const static unsigned int version = 0x000100;
12+
const static unsigned int version = 0x000101;
1313
DownloadManager( void );
1414
~DownloadManager( void );
1515
double getProgress( void );

threaded-libcurl/DownloadManager.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class DownloadManager
7171
@version_string = "0.1.2"
7272

7373
DM = nil
74-
DMVersion = 0x000100
74+
DMVersion = 0x000101
7575
pathExt = "/automation/include/#{@__name}/#{(ffi.os != windows) and 'lib' or ''}#{@__name}.#{(OSX: 'dylib', Windows: 'dll')[ffi.os] or 'so'}"
7676
defaultLibraryPaths = aegisub and {aegisub.decode_path("?user"..pathExt), aegisub.decode_path("?data"..pathExt)} or {@__name}
7777
msgs = {

threaded-libcurl/Downloader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void Downloader::finalize( void ) {
7373
}
7474
}
7575

76-
std::fstream outStream( outfile, std::fstream::out );
76+
std::fstream outStream( outfile, std::ios::out | std::ios::binary );
7777
if (outStream.fail( )) {
7878
error = "Couldn't open output file: " + outfile;
7979
failed = true;

0 commit comments

Comments
 (0)