public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bharath Rupireddy <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Fix a typo in pg_receivewal.c's get_destination_dir()
Date: Sat, 26 Feb 2022 22:04:13 +0530
Message-ID: <CALj2ACUT0C2LQwhyLXTQdj8T9SxZa5j7cmu-UOz0cZ8_D5edjg@mail.gmail.com> (raw)
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:
[application/octet-stream] v1-0001-Fix-a-typo-in-pg_receivewal.c-s-get_destination_d.patch (838B, ../CALj2ACUT0C2LQwhyLXTQdj8T9SxZa5j7cmu-UOz0cZ8_D5edjg@mail.gmail.com/2-v1-0001-Fix-a-typo-in-pg_receivewal.c-s-get_destination_d.patch)
download | inline diff:
From 67a7bac7ed2e535932f72c216591b93879bba2fb Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <[email protected]>
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
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Fix a typo in pg_receivewal.c's get_destination_dir()
In-Reply-To: <CALj2ACUT0C2LQwhyLXTQdj8T9SxZa5j7cmu-UOz0cZ8_D5edjg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox