mirror of
https://github.com/postgres/postgres.git
synced 2025-12-24 06:01:07 +03:00
pg_upgrade: fix CopyFile() on Windows to fail on file existence
Also fix getErrorText() to return the right error string on failure. This behavior now matches that of other operating systems. Report by Noah Misch Backpatch through 9.1
This commit is contained in:
@@ -389,7 +389,7 @@ setup(char *argv0, bool *live_check)
|
||||
|
||||
/* get path to pg_upgrade executable */
|
||||
if (find_my_exec(argv0, exec_path) < 0)
|
||||
pg_fatal("Could not get path name to pg_upgrade: %s\n", getErrorText(errno));
|
||||
pg_fatal("Could not get path name to pg_upgrade: %s\n", getErrorText());
|
||||
|
||||
/* Trim off program name and keep just path */
|
||||
*last_dir_separator(exec_path) = '\0';
|
||||
|
||||
Reference in New Issue
Block a user