1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Add missing diagnostics for rawlog open().

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
Edward Tomasz Napierala 2017-07-28 04:49:14 +01:00
parent e08e2bd87a
commit 42b5e89f6e

View File

@ -128,6 +128,9 @@ void rawlog_open(RAWLOG_REC *rawlog, const char *fname)
path = convert_home(fname); path = convert_home(fname);
rawlog->handle = open(path, O_WRONLY | O_APPEND | O_CREAT, rawlog->handle = open(path, O_WRONLY | O_APPEND | O_CREAT,
log_file_create_mode); log_file_create_mode);
if (rawlog->handle == -1) {
g_warning("rawlog open() failed: %s", strerror(errno));
}
g_free(path); g_free(path);
rawlog_dump(rawlog, rawlog->handle); rawlog_dump(rawlog, rawlog->handle);