FlatDb open with 'r+'

This commit is contained in:
Jaco Greeff
2018-09-07 12:49:22 +02:00
parent 28e77b82d5
commit bcb0186422
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ export default class Compact {
fs.writeFileSync(file, Buffer.alloc(defaults.BRANCH_SIZE));
}
return fs.openSync(file, 'a+');
return fs.openSync(file, 'r+');
}
private _compact (fn: ProgressCb, newFd: number, oldFd: number): number {
+1 -1
View File
@@ -485,6 +485,6 @@ export default class FileFlatDb implements BaseDb {
fs.writeFileSync(file, Buffer.alloc(defaults.BRANCH_SIZE));
}
return fs.openSync(file, 'a+');
return fs.openSync(file, 'r+');
}
}