summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-10 14:39:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-10 14:39:07 -0700
commit3b907d8479fcee553d3601da62ecae1d90d201f8 (patch)
tree4eab33a73e504b9e6ff304d22b495290a0705fc5 /gtk-gui.c
parenta8fd77865c3e3e0a547b8e06a047c44732fe92f2 (diff)
downloadsubsurface-3b907d8479fcee553d3601da62ecae1d90d201f8.tar.gz
Fix silly folder permission bug
I forgot to give the user execute permission on the folder that subsurface might create to store the datafile in. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index a6a124fde..404530024 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_IRUSR | S_IWUSR);
+ 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_IRUSR | S_IWUSR) == 0)
+ if (mkdir(current_def_dir, S_IRWXU) == 0)
need_rmdir = TRUE;
}
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fs_dialog), current_def_dir);