FlatDb open with 'r+'
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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+');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user