From: Tobias Brunner Date: Fri, 17 Sep 2010 15:44:38 +0000 (+0200) Subject: Maemo: Ensure that the settings directory exists. X-Git-Tag: 4.5.0~65 X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=commitdiff_plain;h=ce736b759b692ba83378f8b8f1fc1d4ed5c0143a Maemo: Ensure that the settings directory exists. --- diff --git a/src/frontends/maemo/src/strongswan-connections.c b/src/frontends/maemo/src/strongswan-connections.c index 2686a62..f5ba55c 100644 --- a/src/frontends/maemo/src/strongswan-connections.c +++ b/src/frontends/maemo/src/strongswan-connections.c @@ -139,6 +139,10 @@ strongswan_connections_init (StrongswanConnections *connections) CONFIG_DIR_NAME, CONFIG_FILE_NAME, NULL); + /* ensure that the directory exists */ + gchar *dir = g_path_get_dirname (priv->path); + g_mkdir_with_parents (dir, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); + g_free (dir); priv->connections = g_hash_table_new_full (g_str_hash, g_str_equal,