[postgis-tickets] r15488 - Allow postgis_restore.pl to work on directory-style (-Fd) dumps
Sandro Santilli
strk at kbt.io
Mon Jul 17 07:38:19 PDT 2017
Author: strk
Date: 2017-07-17 07:38:18 -0700 (Mon, 17 Jul 2017)
New Revision: 15488
Modified:
trunk/NEWS
trunk/utils/postgis_restore.pl.in
Log:
Allow postgis_restore.pl to work on directory-style (-Fd) dumps
Patch by Roger Crew
Closes #3788
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2017-07-17 04:45:13 UTC (rev 15487)
+++ trunk/NEWS 2017-07-17 14:38:18 UTC (rev 15488)
@@ -3,6 +3,8 @@
* 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)
Modified: trunk/utils/postgis_restore.pl.in
===================================================================
--- trunk/utils/postgis_restore.pl.in 2017-07-17 04:45:13 UTC (rev 15487)
+++ trunk/utils/postgis_restore.pl.in 2017-07-17 14:38:18 UTC (rev 15488)
@@ -83,12 +83,14 @@
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";
More information about the postgis-tickets
mailing list