aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2015-04-28 20:12:10 -0400
committerBruce Momjian <bruce@momjian.us>2015-04-28 20:12:10 -0400
commitf19d8f14c776b0fa144227ecb2fc17e868a2cc5c (patch)
tree42be899cf66d48b42b56fa9038ef49d6488cd3bc
parent33cb8ff6aa1159f0a359691ca563c98b85d3d723 (diff)
downloadpostgresql-f19d8f14c776b0fa144227ecb2fc17e868a2cc5c.tar.gz
postgresql-f19d8f14c776b0fa144227ecb2fc17e868a2cc5c.zip
pg_basebackup: canonicalize old and new tablespace paths
This avoids problems with double-slash-specified paths. Patch by Ian Barwick
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index f2b54bc0261..83bf2f5519f 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -199,6 +199,9 @@ tablespace_list_append(const char *arg)
exit(1);
}
+ canonicalize_path(cell->old_dir);
+ canonicalize_path(cell->new_dir);
+
if (tablespace_dirs.tail)
tablespace_dirs.tail->next = cell;
else