Skip to content
Permalink
Browse files

Update deprecated Buffer

  • Loading branch information...
Manuel-777 committed Feb 20, 2019
1 parent b517f38 commit 9572ab4945f3a487798aaf38fa3824caaaf9cb51
Showing with 2 additions and 2 deletions.
  1. +1 −1 window_background/arena-log-watcher.js
  2. +1 −1 window_background/mtga-log.js
@@ -86,7 +86,7 @@ function fsWatch(path, onChanged, interval) {
}

async function readChunk(path, position, length) {
const buffer = new Buffer(length);
const buffer = Buffer.alloc(length);
const fd = await fsAsync.open(path, 'r');
try {
await fsAsync.read(fd, buffer, 0, length, position);
@@ -39,7 +39,7 @@ async function stat(path) {
async function readSegment(path, start, length) {
const fd = await fsPromises.open(path, "r");
try {
const buffer = new Buffer(length);
const buffer = Buffer.alloc(length);
const { bytesRead } = await fsPromises.read(fd, buffer, 0, length, start);
return buffer.toString("utf-8", 0, bytesRead);
} finally {

0 comments on commit 9572ab4

Please sign in to comment.
You can’t perform that action at this time.