aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.h
blob: 5e8093f0139afcf80bc1e67b383925d84fee68de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <gio/gio.h>
#include "xml_defs.h"

gboolean install_conf() {
    gchar *our_conf_uri   = "systemd-utl/xml-conf/";
    gchar **data_dir = g_get_system_data_dirs();

    if(g_strcmp0(data_dir[0], NULL)) {
        const gchar our_conf_path[256];
        g_snprintf(our_conf_path, sizeof our_conf_path, "%s%s", *data_dir, our_conf_uri);
        GError **errors;

        /*TODO permissions w/ this */
        g_mkdir_with_parents(our_conf_path, 0644);
    
        return (errors[0] == NULL);

        } else
            return FALSE;
}