1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-26 11:12:19 -05:00

Improve error message from /load -e

This commit is contained in:
TingPing 2013-06-04 06:34:15 -03:00
parent 5201f0fd06
commit e3f699a9d8

View File

@ -2489,7 +2489,7 @@ load_perform_file (session *sess, char *file)
static int static int
cmd_load (struct session *sess, char *tbuf, char *word[], char *word_eol[]) cmd_load (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{ {
char *error, *arg, *file; char *error, *arg, *file, *buf;
int len; int len;
if (!word[2][0]) 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]); file = expand_homedir (word[3]);
if (!load_perform_file (sess, file)) 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)); PrintText (sess, errorstring (errno));
g_free (buf);
} }
free (file); free (file);
return TRUE; return TRUE;