From bd23176653825d5f9a4119f11e0173627db7ab3a Mon Sep 17 00:00:00 2001 From: 2shady4u Date: Sun, 26 Feb 2023 09:42:47 +0100 Subject: [PATCH] Reset VFS file closing to use the close()-method again --- src/vfs/gdsqlite_file.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vfs/gdsqlite_file.cpp b/src/vfs/gdsqlite_file.cpp index 4439e1a..77a9707 100644 --- a/src/vfs/gdsqlite_file.cpp +++ b/src/vfs/gdsqlite_file.cpp @@ -10,9 +10,7 @@ int gdsqlite_file::close(sqlite3_file *pFile) gdsqlite_file *p = reinterpret_cast(pFile); ERR_FAIL_COND_V(!p->file->is_open(), SQLITE_IOERR_CLOSE); - /* FileAccess is now reference counted and shouldn't be closed manually anymore */ - /* Instead, for safety's sake, we call the flush method such that the buffer is written to the disk */ - p->file->flush(); + p->file->close(); p->file.unref(); return SQLITE_OK;