Skip to content
Permalink
Browse files

[processing] replace original layer name with exported in the final O…

…GR command (fix #15099)
  • Loading branch information
alexbruy committed Jun 22, 2016
1 parent 740d9fb commit c81b14d59ec578bf678cab2c71b821de574ac0c3
Showing with 6 additions and 1 deletion.
  1. +6 −1 python/plugins/processing/algs/gdal/GdalAlgorithm.py
@@ -54,7 +54,12 @@ def processAlgorithm(self, progress):
for i, c in enumerate(commands):
for layer in layers:
if layer.source() in c:
c = c.replace(layer.source(), dataobjects.exportVectorLayer(layer, supported))
exported = dataobjects.exportVectorLayer(layer, supported)
exportedFileName = os.path.splitext(os.path.split(exported)[1])[0]
c = c.replace(layer.source(), exported)
if os.path.isfile(layer.source()):
fileName = os.path.splitext(os.path.split(layer.source())[1])[0]
c = c.replace(fileName, exportedFileName)

commands[i] = c
GdalUtils.runGdal(commands, progress)

0 comments on commit c81b14d

Please sign in to comment.
You can’t perform that action at this time.