Don't use ~/.var/app explicitly
Don't do this https://gitlab.gnome.org/raggesilver/blackbox/-/blob/main/src/utils/Constants.vala#L38-42
Instead, do something like this
public string get_user_schemes_dir () {
return Path.build_path (
Path.DIR_SEPARATOR_S, Environment.get_user_data_dir (), "blackbox", "schemes"
);
}
That way, for Flatpak builds, it will be mapped automatically to ~/.var/app/$APP-ID/data/blackbox/schemes
, and for "native" builds, it will be mapped to ~/.local/share/blackbox/schemes
, as expected
(btw, I'm quite sure that Vala adds the final null
automatically for you, no need to do it by yourself)