Closed staticssleever668 closed 1 year ago
I don't have that file on my home, and the URI is specified here: https://www.sqlite.org/inmemorydb.html
Can you post the items of the entry [database]
of your ~/.config/opensnitch/settings.conf
?
I do have that file on Manjaro though.. hmm, I'll investigate it.
removing file:
from the URI doesn't create the file on disk. I'll validate if it keeps the behaviour that I tried to solve.
Can you post the items of the entry
[database]
of your~/.config/opensnitch/settings.conf
?
[database]
file=:memory:
max_days=1
purge_interval=5
purge_oldest=false
type=0
Seems like the value of the file
key was from an older version, so I tried removing the whole section, but the file still appears in the home directory. This is how the section started looking after a restart of opensnitch-ui:
[database]
file="file::memory:?cache=shared"
type=0
According to the documentation, using a in-memory
db with a shared cache, always writes a file to disk:
in order for the special ":memory:" name to apply and to create a pure in-memory database, there must be no additional text in the filename
and
In-memory databases are allowed to use [shared cache](https://www.sqlite.org/sharedcache.html) if they are opened using a [URI filename](https://www.sqlite.org/uri.html).
The only db name that it doesn't write a file to disk is :memory
. I haven't found a way of placing this temporary file in another location.
So I'll think another way of doing this.
Note: this behaviour does not occur on ubuntu 20.04 (libsqlite 3.31.1-4, libqt5sql5 5.12.18, libqt5sql5-sqlite 5.12.18)
I've reverted this change, because it was behaving as if you were using a DB from disk.
So if users want to delete old events, now they'll have to save events to disk.
Describe the bug
A file named
file::memory:?cache=shared
is created in the home directory when the GUI is launched.Linux qwerty 6.1.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 14 Feb 2023 22:08:08 +0000 x86_64 GNU/Linux
To Reproduce 1) Make sure OpenSnitch GUI is not running 1) Check existence of
~/file::memory:?cache=shared
, if it exists - delete it 1) Launch the GUI back 1) See that the file has been createdPost error logs: -
Expected behavior (optional) If I understand correctly, this is supposed to create the file in-memory or in a temporary directory (#844).
Screenshots -
Additional context Looks like a regression introduced in 5b5e2714aef9eb6752d15f41c23a69b013764f1e.