diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-09-17 17:44:38 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-10-14 17:36:17 +0200 |
commit | ce736b759b692ba83378f8b8f1fc1d4ed5c0143a (patch) | |
tree | db3a91f913a4262fcea6e553f88c9bff2a5d5252 /src | |
parent | 005e45330d6b5c585718684adc21b2bed3469038 (diff) | |
download | strongswan-ce736b759b692ba83378f8b8f1fc1d4ed5c0143a.tar.bz2 strongswan-ce736b759b692ba83378f8b8f1fc1d4ed5c0143a.tar.xz |
Maemo: Ensure that the settings directory exists.
Diffstat (limited to 'src')
-rw-r--r-- | src/frontends/maemo/src/strongswan-connections.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/frontends/maemo/src/strongswan-connections.c b/src/frontends/maemo/src/strongswan-connections.c index 2686a620b..f5ba55c84 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, |