diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-02 15:39:34 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-02 15:39:34 -0300 |
commit | b52fd1e7c76c21298d2e2ecc006c5a2d99b46da9 (patch) | |
tree | b7edc15c9cd721674a3992b895e9ef0f13d38346 /src | |
parent | 621e8a603d5668467eac50ff13ce8a9006fd56be (diff) | |
download | postgresql-b52fd1e7c76c21298d2e2ecc006c5a2d99b46da9.tar.gz postgresql-b52fd1e7c76c21298d2e2ecc006c5a2d99b46da9.zip |
Use native path separators to pg_ctl in initdb
On Windows, CMD.EXE allegedly does not run a command that uses forward slashes,
so let's convert the path to use backslashes instead.
Backpatch to 10.
Author: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Reviewed-by: Juan José SantamarÃa Flecha <juanjo.santamaria@gmail.com>
Discussion: https://postgr.es/m/CAMm1aWaNDuaPYFYMAqDeJrZmPtNvLcJRS++CcZWY8LT6KcoBZw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/initdb/initdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index eb75a72793a..291078a1756 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -3281,6 +3281,9 @@ main(int argc, char *argv[]) /* ... and tag on pg_ctl instead */ join_path_components(pg_ctl_path, pg_ctl_path, "pg_ctl"); + /* Convert the path to use native separators */ + make_native_path(pg_ctl_path); + /* path to pg_ctl, properly quoted */ appendShellString(start_db_cmd, pg_ctl_path); |