Skip to content

Commit

Permalink
Fix SHAPE_ENCODING argument should not always get escaped
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 4, 2021
1 parent 662d2cb commit e1c70e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/OgrToPostGis.py
Expand Up @@ -260,7 +260,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
if len(shapeEncoding) > 0:
arguments.append('--config')
arguments.append('SHAPE_ENCODING')
arguments.append('"' + shapeEncoding + '"')
arguments.append(shapeEncoding)
arguments.append('-f')
arguments.append('PostgreSQL')
arguments.append('PG:' + self.getConnectionString(parameters, context))
Expand Down
Expand Up @@ -646,7 +646,7 @@ def testOgr2PostGis(self):
alg.getConsoleCommands({'INPUT': source,
'SHAPE_ENCODING': 'blah'}, context, feedback),
['ogr2ogr',
'-progress --config PG_USE_COPY YES --config SHAPE_ENCODING "blah" -f PostgreSQL "PG:host=localhost port=5432 active_schema=public" '
'-progress --config PG_USE_COPY YES --config SHAPE_ENCODING blah -f PostgreSQL "PG:host=localhost port=5432 active_schema=public" '
'-lco DIM=2 ' + source + ' polys2 '
'-overwrite -lco GEOMETRY_NAME=geom -lco FID=id -nln public.polys2 -nlt PROMOTE_TO_MULTI'])

Expand Down

0 comments on commit e1c70e4

Please sign in to comment.