mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 19:20:35 +01:00
nmcli: Move .nmcli-history
from its previous location unter the users `$HOME` directory to `$XDG_CACHE_HOME/nmcli-history`. This makes `nmcli` compliant with the [XDG Base Directory Specification][1]. [1]: https://specifications.freedesktop.org/basedir-spec/latest/
This commit is contained in:
parent
a2abc85504
commit
66e21700ea
1 changed files with 3 additions and 3 deletions
|
|
@ -6913,7 +6913,7 @@ nmcli_editor_tab_completion(const char *text, int start, int end)
|
|||
return match_array;
|
||||
}
|
||||
|
||||
#define NMCLI_EDITOR_HISTORY ".nmcli-history"
|
||||
#define NMCLI_EDITOR_HISTORY "nmcli-history"
|
||||
|
||||
static void
|
||||
load_history_cmds(const char *uuid)
|
||||
|
|
@ -6925,7 +6925,7 @@ load_history_cmds(const char *uuid)
|
|||
size_t i;
|
||||
GError *err = NULL;
|
||||
|
||||
filename = g_build_filename(g_get_home_dir(), NMCLI_EDITOR_HISTORY, NULL);
|
||||
filename = g_build_filename(g_get_user_cache_dir(), NMCLI_EDITOR_HISTORY, NULL);
|
||||
kf = g_key_file_new();
|
||||
if (!g_key_file_load_from_file(kf, filename, G_KEY_FILE_KEEP_COMMENTS, &err)) {
|
||||
if (g_error_matches(err, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE))
|
||||
|
|
@ -6961,7 +6961,7 @@ save_history_cmds(const char *uuid)
|
|||
if (!hist)
|
||||
return;
|
||||
|
||||
filename = g_build_filename(g_get_home_dir(), NMCLI_EDITOR_HISTORY, NULL);
|
||||
filename = g_build_filename(g_get_user_cache_dir(), NMCLI_EDITOR_HISTORY, NULL);
|
||||
|
||||
kf = g_key_file_new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue