neutralinojs / neutralino.js

JavaScript API for Neutralinojs

Home Page:https://neutralino.js.org/docs/api/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

filesystem.writeBinaryFile appears to corrupt file

sclarke500 opened this issue · comments

Writing a binary file creates a file that appears to be corrupt.

PNG file in Windows 11 reports: "It appears we don't support this file format"
docx (MS Word) file reports: "Word experienced an error trying to open this file"

I encountered the error after downloading a blob, converting to an array buffer and writing, but can also recreate with this code:

let data = await Neutralino.filesystem.readBinaryFile('temp/test.png');
await Neutralino.filesystem.writeBinaryFile(`temp/testCopy.png`, data);

For both tests (png and docx) Windows reported the file size of the copy to have increased slightly (71 bytes and 32 bytes respectively), but the on disk sizes or originals and copies are the same.

from neutralino.config.json:

    "binaryVersion": "4.4.0",
    "clientVersion": "3.3.0"

looks like wrong place, and already reported here:
neutralinojs/neutralinojs#619