]> granicus.if.org Git - postgresql/commitdiff
pg_basebackup: canonicalize old and new tablespace paths
authorBruce Momjian <bruce@momjian.us>
Wed, 29 Apr 2015 00:12:10 +0000 (20:12 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 29 Apr 2015 00:12:10 +0000 (20:12 -0400)
This avoids problems with double-slash-specified paths.

Patch by Ian Barwick

src/bin/pg_basebackup/pg_basebackup.c

index f2b54bc026133d93b26352c486f92247282aeca3..83bf2f5519f1df1bb7c9402fdbc480e33ce38781 100644 (file)
@@ -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