Make sure to create ~/evolution/config/ if it doesn't exist. (ShellView

2001-07-11  Jason Leach  <jleach@ximian.com>

	* e-shell-view.c (e_shell_view_save_settings): Make sure to create
	~/evolution/config/ if it doesn't exist.  (ShellView settings get
	saved before component settings, so when the mailer comes around
	to saving ETree stuff, this dir will be there). Fixes bug #4279.

svn path=/trunk/; revision=10991
This commit is contained in:
Jason Leach
2001-07-11 09:29:53 +00:00
committed by Jacob Leach
parent 73a6f3a7fa
commit fbb2f1feb0
2 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2001-07-11 Jason Leach <jleach@ximian.com>
* e-shell-view.c (e_shell_view_save_settings): Make sure to create
~/evolution/config/ if it doesn't exist. (ShellView settings get
saved before component settings, so when the mailer comes around
to saving ETree stuff, this dir will be there). Fixes bug #4279.
2001-07-10 Jason Leach <jleach@ximian.com>
* e-setup.c (copy_default_stuff): Add a temporary block of code to

View File

@ -28,6 +28,10 @@
#include <config.h>
#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <glib.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
@ -2158,6 +2162,7 @@ e_shell_view_save_settings (EShellView *shell_view,
char *filename;
int num_groups;
int group;
struct stat temp;
g_return_val_if_fail (shell_view != NULL, FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
@ -2220,13 +2225,18 @@ e_shell_view_save_settings (EShellView *shell_view,
g_free (prefix);
/* Save the expanded state for this ShellViews StorageSetView */
/* If ~/evolution/config/ doesn't exist yet, make it */
filename = g_strdup_printf ("%s/config/", e_shell_get_local_directory (priv->shell));
if (stat (filename, &temp) != 0)
mkdir (filename, S_IRWXU);
g_free (filename);
/* Save the expanded state for this ShellView's StorageSetView */
filename = g_strdup_printf ("%s/config/storage-set-view-expanded:view_%d",
e_shell_get_local_directory (priv->shell),
view_num);
e_tree_save_expanded_state (E_TREE (priv->storage_set_view),
filename);
g_free (filename);
return TRUE;