Keep a symlinked kanshi config a symlink

This commit is contained in:
Mars-Wave
2026-02-23 20:46:49 +01:00
parent 0e9f444947
commit 6bed905159
+5
View File
@@ -4,6 +4,7 @@
#include <errno.h>
#include <fnmatch.h>
#include <stdlib.h>
#include <string.h>
#include "wdisplays.h"
@@ -469,6 +470,10 @@ static char *update_config(const char *text, struct wl_list *outputs,
static bool write_config(const char *path, const char *contents,
GError **error) {
g_autofree char *real_path = realpath(path, NULL);
if (real_path != NULL) {
path = real_path;
}
g_autofree char *dir = g_path_get_dirname(path);
if (g_mkdir_with_parents(dir, 0755) != 0) {
int err = errno;