]> granicus.if.org Git - postgis/commitdiff
Allow postgis_restore.pl to work on directory-style (-Fd) dumps
authorSandro Santilli <strk@kbt.io>
Mon, 17 Jul 2017 14:38:18 +0000 (14:38 +0000)
committerSandro Santilli <strk@kbt.io>
Mon, 17 Jul 2017 14:38:18 +0000 (14:38 +0000)
Patch by Roger Crew
Closes #3788

git-svn-id: http://svn.osgeo.org/postgis/trunk@15488 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
utils/postgis_restore.pl.in

diff --git a/NEWS b/NEWS
index 7f9b636c0f50bc87b622ce490530934ae38cd36a..c2bb7e6c14911f33b1e0e9e07c8be91814de56cb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PostGIS 2.4.0
 
  * New Features *
 
+  - #3788, Allow postgis_restore.pl to work on directory-style (-Fd) dumps
+           (Roger Crew)
   - #3772, Direction agnostic ST_CurveToLine output (Sandro Santilli / KKGeo)
   - #2464, ST_CurveToLine with MaxError tolerance (Sandro Santilli / KKGeo)
   - #3599, Geobuf output support via ST_AsGeobuf (Björn Harrtell)
index 7561edd3bcb8e4639302e4570b38a4a23e0b8ead..c3bc57ccf0a3f09563b6f94dce0ba07b62168718 100644 (file)
@@ -83,12 +83,14 @@ while (@ARGV && $ARGV[0] =~ /^-/) {
 die $usage if (@ARGV < 1);
 
 my $dumpfile = $ARGV[0];
-my $manifest = $dumpfile . ".lst";
+my $manifest = $dumpfile;
+$manifest =~ s/\/$//; # strip trailing slash
+$manifest .= ".lst";
 my $hasTopology = 0;
 
 die "$me:\tUnable to find 'pg_dump' on the path.\n" if ! `pg_dump --version`;
 die "$me:\tUnable to find 'pg_restore' on the path.\n" if ! `pg_restore --version`;
-die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -f $dumpfile;
+die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -r $dumpfile;
 
 print STDERR "Converting $dumpfile to ASCII on stdout...\n";