Skip to content

Commit

Permalink
[processing][gdal] ";" characters must be escaped when running gdal
Browse files Browse the repository at this point in the history
commands
  • Loading branch information
nyalldawson committed Feb 26, 2021
1 parent 2a8867f commit ea113cb
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/GdalUtils.py
Expand Up @@ -250,7 +250,7 @@ def getFormatShortNameFromFilename(filename):

@staticmethod
def escapeAndJoin(strList):
escChars = [' ', '&', '(', ')', '"']
escChars = [' ', '&', '(', ')', '"', ';']
joined = ''
for s in strList:
if not isinstance(s, str):
Expand Down
Expand Up @@ -338,7 +338,7 @@ def testCrsConversion(self):
self.assertEqual(GdalUtils.gdal_crs_string(QgsCoordinateReferenceSystem('ESRI:102003')), 'ESRI:102003')

def testEscapeAndJoin(self):
self.assertEqual(GdalUtils.escapeAndJoin([1, "a", "a b", "a&b", "a(b)"]), '1 a "a b" "a&b" "a(b)"')
self.assertEqual(GdalUtils.escapeAndJoin([1, "a", "a b", "a&b", "a(b)", ";"]), '1 a "a b" "a&b" "a(b)" ";"')


if __name__ == '__main__':
Expand Down

0 comments on commit ea113cb

Please sign in to comment.