Fix corrupted data in Windows systems (#47)

The base64 data from the decoder to the file writer is in binary, using only the "w" flag would work in most unix systems but its incorrect and for all systems with crazy line_feed/Carrier_return or any character conversion the right way to save a binary data is using the "wb" flag.
This commit is contained in:
Suns 2020-05-23 03:56:30 -03:00 提交者 GitHub
父節點 55dc55f2dd
當前提交 ec30267223
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除

查看文件

@ -75,7 +75,7 @@ end
-- Insecure workaround since meta/ and textures/ cannot be written to
local function unsafe_file_write(path, contents)
local f = ie.io.open(path, "w")
local f = ie.io.open(path, "wb")
f:write(contents)
f:close()
end