You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/sdcv/files/sdcv-0.4.2-respect-HOME.patch

18 lines
490 B

=== modified file 'src/sdcv.cpp'
--- src/sdcv.cpp 2008-11-18 12:43:28 +0000
+++ src/sdcv.cpp 2008-11-18 12:43:41 +0000
@@ -161,7 +161,11 @@
strlist_t dicts_dir_list;
- dicts_dir_list.push_back(std::string(g_get_home_dir())+G_DIR_SEPARATOR+
+ const char *homedir = g_getenv ("HOME");
+ if (!homedir)
+ homedir = g_get_home_dir ();
+
+ dicts_dir_list.push_back(std::string(homedir)+G_DIR_SEPARATOR+
".stardict"+G_DIR_SEPARATOR+"dic");
dicts_dir_list.push_back(data_dir);