summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-05 23:37:49 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-05 23:37:49 +0000
commit6ea6bdd894fd0c00e781360d6dfc6dea1a36f5c6 (patch)
tree8061223c488bfadb4b9bd33d783cf9d9d992f1dd /mixlib
parent51c6106722d508dc25b5f85ed1a0f08adc494a70 (diff)
downloadmdk-6ea6bdd894fd0c00e781360d6dfc6dea1a36f5c6.tar.gz
mdk-6ea6bdd894fd0c00e781360d6dfc6dea1a36f5c6.tar.bz2
use mix_stat_dir
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_config.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mixlib/mix_config.c b/mixlib/mix_config.c
index 721e88e..d03e949 100644
--- a/mixlib/mix_config.c
+++ b/mixlib/mix_config.c
@@ -52,8 +52,7 @@ mix_config_new (const gchar *dirname, const gchar *filename)
const gchar *autosave;
FILE *f;
- int k;
- mix_config_t *result = g_new (mix_config_t, 1);
+ mix_config_t *result = NULL;
if (DEF_DIRNAME_ == NULL)
DEF_DIRNAME_ = g_strdup_printf ("%s/%s", g_get_home_dir (), DEF_DIR_);
@@ -61,9 +60,9 @@ mix_config_new (const gchar *dirname, const gchar *filename)
if (dirname == NULL) dirname = DEF_DIRNAME_;
if (filename == NULL) filename = DEF_FILENAME_;
- k = mkdir (dirname, S_IRWXU | S_IRWXG | S_IRWXO);
- if (!k) g_message ("Configuration directory %s created\n", dirname);
+ if (!mix_stat_dir (dirname, "configuration")) return NULL;
+ result = g_new (mix_config_t, 1);
result->filename = g_strdup_printf ("%s/%s", dirname, filename);
result->items = g_hash_table_new (g_str_hash, g_str_equal);