aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-shell-view.c14
2 files changed, 19 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 790a58a69c..5025440c44 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -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
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 7718f471ab..689a299871 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -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;