Skip to content

Commit

Permalink
Reset VFS file closing to use the close()-method again
Browse files Browse the repository at this point in the history
  • Loading branch information
2shady4u committed Feb 26, 2023
1 parent f7bbf99 commit bd23176
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/vfs/gdsqlite_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ int gdsqlite_file::close(sqlite3_file *pFile)
gdsqlite_file *p = reinterpret_cast<gdsqlite_file *>(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;
Expand Down

0 comments on commit bd23176

Please sign in to comment.