aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pg_upgrade/option.c')
-rw-r--r--contrib/pg_upgrade/option.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/contrib/pg_upgrade/option.c b/contrib/pg_upgrade/option.c
index df737ac228d..83300a9e51e 100644
--- a/contrib/pg_upgrade/option.c
+++ b/contrib/pg_upgrade/option.c
@@ -84,20 +84,7 @@ parseCommandLine(migratorContext *ctx, int argc, char *argv[])
if (user_id == 0)
pg_log(ctx, PG_FATAL, "%s: cannot be run as root\n", ctx->progname);
-#ifndef WIN32
- get_home_path(ctx->home_dir);
-#else
- {
- char *tmppath;
-
- /* TMP is the best place on Windows, rather than APPDATA */
- if ((tmppath = getenv("TMP")) == NULL)
- pg_log(ctx, PG_FATAL, "TMP environment variable is not set.\n");
- snprintf(ctx->home_dir, MAXPGPATH, "%s", tmppath);
- }
-#endif
-
- snprintf(ctx->output_dir, MAXPGPATH, "%s/" OUTPUT_SUBDIR, ctx->home_dir);
+ getcwd(ctx->cwd, MAXPGPATH);
while ((option = getopt_long(argc, argv, "d:D:b:B:cgG:kl:p:P:u:v",
long_options, &optindex)) != -1)