From e3f699a9d8c90baa0a172befb01f22536062af41 Mon Sep 17 00:00:00 2001 From: TingPing Date: Tue, 4 Jun 2013 06:34:15 -0300 Subject: [PATCH] Improve error message from /load -e --- src/common/outbound.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/outbound.c b/src/common/outbound.c index de547ec8..bae77970 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2489,7 +2489,7 @@ load_perform_file (session *sess, char *file) static int cmd_load (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { - char *error, *arg, *file; + char *error, *arg, *file, *buf; int len; if (!word[2][0]) @@ -2500,8 +2500,10 @@ cmd_load (struct session *sess, char *tbuf, char *word[], char *word_eol[]) file = expand_homedir (word[3]); if (!load_perform_file (sess, file)) { - PrintTextf (sess, _("Cannot access %s\n"), file); + buf = g_strdup_printf ("%s%c%s", get_xdir(), G_DIR_SEPARATOR, file); + PrintTextf (sess, _("Cannot access %s\n"), buf); PrintText (sess, errorstring (errno)); + g_free (buf); } free (file); return TRUE;