main: specify enconding rather than converting buffer to string

This commit is contained in:
Dawid Dziurla 2020-03-01 12:01:21 +01:00
parent ae7db41acb
commit 8c2729a391
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -5,7 +5,7 @@ const fs = require("fs")
function get_body(body) {
if (body.startsWith("file://")) {
body = body.replace("file://", "")
body = fs.readFileSync(body).toString()
body = fs.readFileSync(body, "utf8")
}
return body