Fix reading/writing linked files

"base" was not really base but the filename :-)

Fix https://github.com/profanity-im/profanity/issues/1362
This commit is contained in:
Michael Vetter
2020-06-13 15:02:43 +02:00
parent 74e061165a
commit 914c6752dd
5 changed files with 5 additions and 4 deletions

View File

@@ -176,7 +176,7 @@ _save_settings(void)
gchar *g_data = g_key_file_to_data(settings, &g_data_size, NULL);
char *fileloc = files_get_data_path(FILE_PLUGIN_SETTINGS);
gchar *base = g_path_get_basename(fileloc);
gchar *base = g_path_get_dirname(fileloc);
gchar *true_loc = get_file_or_linked(fileloc, base);
g_free(base);
g_file_set_contents(true_loc, g_data, g_data_size, NULL);