From 0171b1a6343434477845ac5365e5ee20ceef7904 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sun, 22 Nov 2015 21:59:28 +0100 Subject: Use the expanded filename when picking the awaylog This fixes a long-standing bug where 'fname' was being feed to cat instead of 'real_fname', causing it to quit with a 'No such file or directory' error. FS#377 --- src/fe-common/core/fe-log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fe-common/core/fe-log.c') diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index 476abaab..f2c4c014 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -617,7 +617,7 @@ static void sig_window_item_remove(WINDOW_REC *window, WI_ITEM_REC *item) static void sig_log_locked(LOG_REC *log) { printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, - TXT_LOG_LOCKED, log->fname); + TXT_LOG_LOCKED, log->real_fname); } static void sig_log_create_failed(LOG_REC *log) @@ -657,11 +657,11 @@ static void sig_awaylog_show(LOG_REC *log, gpointer pmsgs, gpointer pfilepos) filepos = GPOINTER_TO_INT(pfilepos); if (msgs == 0) - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_NO_AWAY_MSGS, log->fname); + printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_NO_AWAY_MSGS, log->real_fname); else { - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_AWAY_MSGS, log->fname, msgs); + printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_AWAY_MSGS, log->real_fname, msgs); - str = g_strdup_printf("\"%s\" %d", log->fname, filepos); + str = g_strdup_printf("\"%s\" %d", log->real_fname, filepos); signal_emit("command cat", 1, str); g_free(str); } -- cgit v1.2.3