You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very simple request, and should be pretty easy to implement, but could vpnns use the XDG Base Directory Specification for where it puts its state files? I think it would be as simple as replacing getenv("HOME") in
if (asprintf(&statedir, "%s/.vpnns-%s", getenv("HOME"), name) <0)
with
char*state_home=getenv("XDG_STATE_HOME");
if (!state_home||strlen(state_home) ==0) {
state_home=getenv("HOME");
strncat(state_home, "/.local/state",
sizeof(state_home) -strlen(state_home) -1);
}
if (asprintf(&statedir, "%s/.vpnns-%s", getenv("HOME"), name) <0)
Note that this might be improved as I haven't really done any serious projects in C before, but this takes into account the cases where the variable is set to the empty string as well.
The text was updated successfully, but these errors were encountered:
This is a very simple request, and should be pretty easy to implement, but could
vpnns
use the XDG Base Directory Specification for where it puts its state files? I think it would be as simple as replacinggetenv("HOME")
inocproxy/src/vpnns.c
Line 842 in c98f06d
with
Note that this might be improved as I haven't really done any serious projects in C before, but this takes into account the cases where the variable is set to the empty string as well.
The text was updated successfully, but these errors were encountered: