mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Use Buffer.alloc instead of the Buffer constructor.
https://circleci.com/gh/meteor/meteor/32465
This commit is contained in:
@@ -1878,7 +1878,7 @@ files.unwatchFile = function (...args) {
|
||||
};
|
||||
|
||||
files.readBufferWithLengthAndOffset = function (filename, length, offset) {
|
||||
var data = new Buffer(length);
|
||||
var data = Buffer.alloc(length);
|
||||
// Read the data from disk, if it is non-empty. Avoid doing IO for empty
|
||||
// files, because (a) unnecessary and (b) fs.readSync with length 0
|
||||
// throws instead of acting like POSIX read:
|
||||
|
||||
Reference in New Issue
Block a user