Deleting a database should not crash anymore.

[GB.DB.SQLITE3]
* BUG: Deleting a database should not crash anymore.
This commit is contained in:
gambas 2018-12-02 22:14:54 +01:00
parent 784d27f7b6
commit 4a033f5f06

View File

@ -2273,10 +2273,16 @@ static int database_delete(DB_DATABASE * db, const char *name)
}
else
{
other = GB.AddString(GB.TempString(fullpath, -1), "-shm", -1);
other = GB.NewString(fullpath, GB.StringLength(fullpath));
other = GB.AddString(other, "-shm", 4);
unlink(other);
other = GB.AddString(GB.TempString(fullpath, -1), "-wal", -1);
GB.FreeString(&other);
other = GB.NewString(fullpath, GB.StringLength(fullpath));
other = GB.AddString(other, "-wal", 4);
unlink(other);
GB.FreeString(&other);
err = FALSE;
}