aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-11 11:42:47 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-11 12:08:07 -0700
commit2a9679dac62d16ad727dc111f02bf441a2d6c7e1 (patch)
treea677cf13f819bf493b00e575044519af46f12a88
parentb4d55c8b598b648acda0f8107868b8753283c72e (diff)
downloadsubsurface-2a9679dac62d16ad727dc111f02bf441a2d6c7e1.tar.gz
Use glibio functions for mkdir
Suggested-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--dive.h1
-rw-r--r--gtk-gui.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/dive.h b/dive.h
index 227de387c..ca90a9ae4 100644
--- a/dive.h
+++ b/dive.h
@@ -5,6 +5,7 @@
#include <time.h>
#include <glib.h>
+#include <glib/gstdio.h>
#include <libxml/tree.h>
/*
diff --git a/gtk-gui.c b/gtk-gui.c
index 404530024..d24675927 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -255,7 +255,7 @@ static void file_save(GtkWidget *w, gpointer data)
current_def_dir = path_and_file(existing_filename, &current_def_file);
if (stat(current_def_dir, &sb) != 0) {
- mkdir(current_def_dir, S_IRWXU);
+ g_mkdir(current_def_dir, S_IRWXU);
}
}
free((void *)current_default);
@@ -507,7 +507,7 @@ static void pick_default_file(GtkWidget *w, GtkButton *button)
* For gtk's file select box to make sense we create it if needed and then remove
* it after the dialog has run */
if (stat(current_def_dir, &sb) != 0) {
- if (mkdir(current_def_dir, S_IRWXU) == 0)
+ if (g_mkdir(current_def_dir, S_IRWXU) == 0)
need_rmdir = TRUE;
}
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fs_dialog), current_def_dir);