summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_font.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2008-05-07 01:52:24 +0000
committerjsorg71 <jsorg71>2008-05-07 01:52:24 +0000
commit71f58fad8bddd07a708d04ff7d9e32b7c6268567 (patch)
treef62b64c2337694914f56ca2bbd7197fb06fcaf38 /xrdp/xrdp_font.c
parentef69b94717eb4f33caa691ade2537cbbfe2d1002 (diff)
downloadxrdp-proprietary-71f58fad8bddd07a708d04ff7d9e32b7c6268567.tar.gz
xrdp-proprietary-71f58fad8bddd07a708d04ff7d9e32b7c6268567.zip
use share path when loading files
Diffstat (limited to 'xrdp/xrdp_font.c')
-rw-r--r--xrdp/xrdp_font.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xrdp/xrdp_font.c b/xrdp/xrdp_font.c
index 3c2e8099..7b143d43 100644
--- a/xrdp/xrdp_font.c
+++ b/xrdp/xrdp_font.c
@@ -75,9 +75,11 @@ xrdp_font_create(struct xrdp_wm* wm)
int datasize;
int file_size;
struct xrdp_font_char* f;
+ char file_path[256];
DEBUG(("in xrdp_font_create"));
- file_size = g_file_get_size(DEFAULT_FONT_NAME);
+ g_snprintf(file_path, 255, "%s/%s", XRDP_SHARE_PATH, DEFAULT_FONT_NAME);
+ file_size = g_file_get_size(file_path);
if (file_size < 1)
{
return 0;
@@ -86,7 +88,7 @@ xrdp_font_create(struct xrdp_wm* wm)
self->wm = wm;
make_stream(s);
init_stream(s, file_size + 1024);
- fd = g_file_open(DEFAULT_FONT_NAME);
+ fd = g_file_open(file_path);
if (fd != -1)
{
b = g_file_read(fd, s->data, file_size + 1024);