diff finch/finch.c @ 30651:f30a02140f74

Create the ~/.purple/plugins directory on startup if it does not exist already, because the absence of this directory causes a surprising amount of confusion for users told to put their plugins there Also get rid of our SIGHUP handler, because it does nothing
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 30 Jun 2010 02:26:33 +0000
parents f94d701aa306
children a8cc50c2279f
line wrap: on
line diff
--- a/finch/finch.c	Wed Jun 30 01:46:42 2010 +0000
+++ b/finch/finch.c	Wed Jun 30 02:26:33 2010 +0000
@@ -252,6 +252,7 @@
 	gboolean opt_version = FALSE;
 	char *opt_config_dir_arg = NULL;
 	gboolean debug_enabled = FALSE;
+	struct stat st;
 
 	struct option long_options[] = {
 		{"config",   required_argument, NULL, 'c'},
@@ -361,6 +362,8 @@
 	purple_idle_set_ui_ops(finch_idle_get_ui_ops());
 
 	path = g_build_filename(purple_user_dir(), "plugins", NULL);
+	if (!g_stat(path, &st))
+		g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
 	purple_plugins_add_search_path(path);
 	g_free(path);