Quote filename in error message

Project standard is to quote filenames in error and log messages, which
commit 2da74d8d640 missed in two error messages.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reported-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/20250404.120328.103562371975971823.horikyota.ntt@gmail.com
This commit is contained in:
Daniel Gustafsson 2025-04-05 22:10:28 +02:00
parent 691836405f
commit 683df3f4de

View File

@ -711,7 +711,7 @@ SSL_CTX_keylog_cb(const SSL *ssl, const char *line)
if (fd == -1)
{
libpq_append_conn_error(conn, "could not open ssl keylog file %s: %s",
libpq_append_conn_error(conn, "could not open ssl keylog file \"%s\": %s",
conn->sslkeylogfile, pg_strerror(errno));
return;
}
@ -719,7 +719,7 @@ SSL_CTX_keylog_cb(const SSL *ssl, const char *line)
/* line is guaranteed by OpenSSL to be NUL terminated */
rc = write(fd, line, strlen(line));
if (rc < 0)
libpq_append_conn_error(conn, "could not write to ssl keylog file %s: %s",
libpq_append_conn_error(conn, "could not write to ssl keylog file \"%s\": %s",
conn->sslkeylogfile, pg_strerror(errno));
else
rc = write(fd, "\n", 1);