Verified Commit 9e0839e8 authored by AtjonTV's avatar AtjonTV

ffdb: Check the buffer for empty before trying to flush

parent 089f17a3
......@@ -144,6 +144,9 @@ class FFDB(val storageFile: File, val schemaVersion: Int = Version.V2.version) {
* @author Thomas Obernosterer
*/
fun flush() {
if (writeBuffer.isEmpty()) {
return
}
when (schemaVersion) {
Version.V1.version -> writeV1(storageFile.objectOutputStream())
Version.V2.version -> writeV2(storageFile.objectOutputStream())
......
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