summaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/file.c')
-rw-r--r--src/bin/pg_upgrade/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_upgrade/file.c b/src/bin/pg_upgrade/file.c
index 37eb832c93a..c84783c9de6 100644
--- a/src/bin/pg_upgrade/file.c
+++ b/src/bin/pg_upgrade/file.c
@@ -37,9 +37,9 @@ copyAndUpdateFile(pageCnvCtx *pageConverter,
#ifndef WIN32
if (copy_file(src, dst, force) == -1)
#else
- if (CopyFile(src, dst, force) == 0)
+ if (CopyFile(src, dst, !force) == 0)
#endif
- return getErrorText(errno);
+ return getErrorText();
else
return NULL;
}
@@ -121,7 +121,7 @@ linkAndUpdateFile(pageCnvCtx *pageConverter,
return "Cannot in-place update this cluster, page-by-page conversion is required";
if (pg_link_file(src, dst) == -1)
- return getErrorText(errno);
+ return getErrorText();
else
return NULL;
}
@@ -219,7 +219,7 @@ check_hard_link(void)
{
pg_fatal("Could not create hard link between old and new data directories: %s\n"
"In link mode the old and new data directories must be on the same file system volume.\n",
- getErrorText(errno));
+ getErrorText());
}
unlink(new_link_file);
}