mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 06:06:21 +00:00
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:
@@ -969,7 +969,7 @@ _save_accounts(void)
|
||||
gsize g_data_size;
|
||||
gchar *g_accounts_data = g_key_file_to_data(accounts, &g_data_size, NULL);
|
||||
|
||||
gchar *base = g_path_get_basename(accounts_loc);
|
||||
gchar *base = g_path_get_dirname(accounts_loc);
|
||||
gchar *true_loc = get_file_or_linked(accounts_loc, base);
|
||||
g_file_set_contents(true_loc, g_accounts_data, g_data_size, NULL);
|
||||
g_chmod(accounts_loc, S_IRUSR | S_IWUSR);
|
||||
|
||||
@@ -1665,7 +1665,7 @@ _save_prefs(void)
|
||||
{
|
||||
gsize g_data_size;
|
||||
gchar *g_prefs_data = g_key_file_to_data(prefs, &g_data_size, NULL);
|
||||
gchar *base = g_path_get_basename(prefs_loc);
|
||||
gchar *base = g_path_get_dirname(prefs_loc);
|
||||
gchar *true_loc = get_file_or_linked(prefs_loc, base);
|
||||
|
||||
g_file_set_contents(true_loc, g_prefs_data, g_data_size, NULL);
|
||||
|
||||
Reference in New Issue
Block a user