mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +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:
@ -214,7 +214,7 @@ check_loadable_libraries(void)
|
||||
|
||||
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
|
||||
pg_fatal("Could not open file \"%s\": %s\n",
|
||||
output_path, getErrorText(errno));
|
||||
output_path, getErrorText());
|
||||
fprintf(script, "Could not load library \"%s\"\n%s\n",
|
||||
lib,
|
||||
PQerrorMessage(conn));
|
||||
|
Reference in New Issue
Block a user