Fix a typo in pg_receivewal.c's get_destination_dir()
Hi,
It looks like there's a typo in pg_receivewal.c's
get_destination_dir(), that is, use the function parameter dest_folder
instead of global variable basedir in the error message. Although
there's no harm in it as basedir is a global variable in
pg_receivewal.c, let's use the function parameter to be in sync with
close_destination_dir.
Attaching a tiny patch to fix it.
Regards,
Bharath Rupireddy.
Attachments:
v1-0001-Fix-a-typo-in-pg_receivewal.c-s-get_destination_d.patchapplication/octet-stream; name=v1-0001-Fix-a-typo-in-pg_receivewal.c-s-get_destination_d.patchDownload
From 67a7bac7ed2e535932f72c216591b93879bba2fb Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Sat, 26 Feb 2022 16:31:49 +0000
Subject: [PATCH v1] Fix a typo in pg_receivewal.c's get_destination_dir()
---
src/bin/pg_basebackup/pg_receivewal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index ccb215c398..ce661a9ce4 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -240,7 +240,7 @@ get_destination_dir(char *dest_folder)
dir = opendir(dest_folder);
if (dir == NULL)
{
- pg_log_error("could not open directory \"%s\": %m", basedir);
+ pg_log_error("could not open directory \"%s\": %m", dest_folder);
exit(1);
}
--
2.25.1
Hi,
On 2022-02-26 22:04:13 +0530, Bharath Rupireddy wrote:
It looks like there's a typo in pg_receivewal.c's
get_destination_dir(), that is, use the function parameter dest_folder
instead of global variable basedir in the error message. Although
there's no harm in it as basedir is a global variable in
pg_receivewal.c, let's use the function parameter to be in sync with
close_destination_dir.Attaching a tiny patch to fix it.
Good catch, pushed.
Greetings,
Andres Freund