1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Fix runtime error with wrong datadir.

Obtained from:	James Hung via facebook.
This commit is contained in:
Vanilla I. Shu 2015-02-26 14:28:14 +00:00
parent dd4a95cbc1
commit 29db6498d8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=380006
2 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= libchewing
PORTVERSION= 0.4.0
PORTREVISION= 1
CATEGORIES= chinese textproc
MAINTAINER= ports@FreeBSD.org

View File

@ -0,0 +1,15 @@
--- src/porting_layer/src/plat_path.c.orig 2015-02-26 14:13:31 UTC
+++ src/porting_layer/src/plat_path.c
@@ -36,10 +36,10 @@ int get_search_path(char *path, size_t p
} else {
home = getenv("HOME");
if (home) {
- snprintf(path, path_len, "%s/.chewing" SEARCH_PATH_SEP CHEWING_DATADIR "/libchewing", home);
+ snprintf(path, path_len, "%s/.chewing" SEARCH_PATH_SEP CHEWING_DATADIR, home);
} else {
// No HOME ?
- strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR "/libchewing", path_len);
+ strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR, path_len);
}
}