aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/colors.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/colors.c')
-rw-r--r--gtk/colors.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk/colors.c b/gtk/colors.c
index 4df4a807e9..ac29b6db79 100644
--- a/gtk/colors.c
+++ b/gtk/colors.c
@@ -1,7 +1,7 @@
/* colors.c
* Definitions for color structures and routines
*
- * $Id: colors.c,v 1.12 2001/10/22 22:59:26 guy Exp $
+ * $Id: colors.c,v 1.13 2001/10/23 05:01:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -39,6 +39,7 @@
#endif
#include <epan/filesystem.h>
+
#include "gtk/main.h"
#include "packet.h"
#include "colors.h"
@@ -287,9 +288,19 @@ write_filter(gpointer filter_arg, gpointer file_arg)
gboolean
write_filters(colfilter *filter)
{
+ const gchar *pf_dir_path;
const gchar *path;
FILE *f;
+ /* Create the directory that holds personal configuration files,
+ if necessary. */
+ if (create_persconffile_dir(&pf_dir_path) == -1) {
+ simple_dialog(ESD_TYPE_WARN, NULL,
+ "Can't create directory\n\"%s\"\nfor color files: %s.",
+ pf_dir_path, strerror(errno));
+ return FALSE;
+ }
+
path = get_colorfilter_file_path();
if ((f = fopen(path, "w+")) == NULL) {
simple_dialog(ESD_TYPE_CRIT, NULL,