Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit 6ca58cf8 authored by Deucе's avatar Deucе 👌🏾

Revert back to using vbuf for write buffering.

While it would be nice to serialize it and do a single write, there's
no native functions to create binary values from numbers in the
Synchronet JS object model at this time.
parent 17ac4341
......@@ -70,9 +70,7 @@ function RecordFile(filename, definition)
// A vbuf of a record length prevents more than one record from being in the buffer.
// Nope, it doesn't... use zero an force unbuffered.
// This will be super-slow until/unless some serialization is added.
if(!"rb+":"wb+",true,0)) {
if(!"rb+":"wb+",true,this.RecordLength)) {
Object.defineProperty(this, 'length', {
......@@ -99,8 +97,6 @@ RecordFileRecord.prototype.flushRead = function(keeplocked)
var flushed = false;
var tmp;
// With buffer size of zero, this isn't needed
locked = (this.parent.locks.indexOf(this.Record) !== -1);
if (keeplocked === undefined) {
if (locked) {
......@@ -119,7 +115,7 @@ RecordFileRecord.prototype.flushRead = function(keeplocked)
if (!'rb+', true, 0)) {
if (!'rb+', true, this.parent.RecordLength)) {
throw new Error('Unable to re-open ';
if (locked) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment