mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 14:03:24 +00:00
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>
This commit is contained in:
parent
a8fd77865c
commit
3b907d8479
1 changed files with 2 additions and 2 deletions
|
@ -255,7 +255,7 @@ static void file_save(GtkWidget *w, gpointer data)
|
||||||
|
|
||||||
current_def_dir = path_and_file(existing_filename, ¤t_def_file);
|
current_def_dir = path_and_file(existing_filename, ¤t_def_file);
|
||||||
if (stat(current_def_dir, &sb) != 0) {
|
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);
|
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
|
* For gtk's file select box to make sense we create it if needed and then remove
|
||||||
* it after the dialog has run */
|
* it after the dialog has run */
|
||||||
if (stat(current_def_dir, &sb) != 0) {
|
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;
|
need_rmdir = TRUE;
|
||||||
}
|
}
|
||||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fs_dialog), current_def_dir);
|
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fs_dialog), current_def_dir);
|
||||||
|
|
Loading…
Add table
Reference in a new issue