55817a1
Use environment variable HOME to get home directory. g_get_home_dir does
55817a1
ignore it.
55817a1
Index: sdcv-0.4.2/src/sdcv.cpp
55817a1
===================================================================
55817a1
--- sdcv-0.4.2.orig/src/sdcv.cpp	2008-10-03 09:15:26.000000000 +0200
55817a1
+++ sdcv-0.4.2/src/sdcv.cpp	2008-10-03 09:16:25.000000000 +0200
55817a1
@@ -157,11 +157,14 @@
55817a1
 			data_dir="/usr/share/stardict/dic";
55817a1
 	}
55817a1
 
55817a1
+	const char *homedir = g_getenv ("HOME");
55817a1
+	if (!homedir)
55817a1
+		homedir = g_get_home_dir ();
55817a1
 
55817a1
 
55817a1
 	strlist_t dicts_dir_list;
55817a1
 
55817a1
-	dicts_dir_list.push_back(std::string(g_get_home_dir())+G_DIR_SEPARATOR+
55817a1
+	dicts_dir_list.push_back(std::string(homedir)+G_DIR_SEPARATOR+
55817a1
 				 ".stardict"+G_DIR_SEPARATOR+"dic");
55817a1
 	dicts_dir_list.push_back(data_dir);   
55817a1
 
55817a1
@@ -186,7 +189,7 @@
55817a1
 	}
55817a1
 
55817a1
     
55817a1
-	string conf_dir = string(g_get_home_dir())+G_DIR_SEPARATOR+".stardict";
55817a1
+	string conf_dir = string(homedir)+G_DIR_SEPARATOR+".stardict";
55817a1
 	if (g_mkdir(conf_dir.c_str(), S_IRWXU)==-1 && errno!=EEXIST)
55817a1
 		fprintf(stderr, _("g_mkdir failed: %s\n"), strerror(errno));
55817a1