diff options
| author | 2008-08-17 21:59:54 +0200 | |
|---|---|---|
| committer | 2008-08-21 19:13:35 +0200 | |
| commit | ab38ab2ec7166f35aa0b8943d0b9f020c514e024 (patch) | |
| tree | fd79a47777eecefe8c7669876cbd32fa61662ff7 | |
| parent | 3f37575f65b97acea684009a816b256dc4cd4a08 (diff) | |
| download | libimobiledevice-ab38ab2ec7166f35aa0b8943d0b9f020c514e024.tar.gz libimobiledevice-ab38ab2ec7166f35aa0b8943d0b9f020c514e024.tar.bz2 | |
fixes config dir mode.
| -rw-r--r-- | src/userpref.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/userpref.c b/src/userpref.c index b2fdd2d..41b11bc 100644 --- a/src/userpref.c +++ b/src/userpref.c | |||
| @@ -260,10 +260,11 @@ int get_host_certificate(gnutls_datum_t* host_cert) { | |||
| 260 | /** Creates a freedesktop compatible configuration directory for libiphone. | 260 | /** Creates a freedesktop compatible configuration directory for libiphone. |
| 261 | */ | 261 | */ |
| 262 | inline void create_config_dir() { | 262 | inline void create_config_dir() { |
| 263 | gchar* config_dir; | 263 | gchar* config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), LIBIPHONE_CONF_DIR, NULL); |
| 264 | 264 | ||
| 265 | config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), LIBIPHONE_CONF_DIR, NULL); | 265 | if (!g_file_test(config_dir, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) )) |
| 266 | g_mkdir_with_parents(config_dir, 0755); | 266 | g_mkdir_with_parents(config_dir, 0755); |
| 267 | |||
| 267 | g_free(config_dir); | 268 | g_free(config_dir); |
| 268 | } | 269 | } |
| 269 | 270 | ||
