Skip to content

Commit

Permalink
[processing] replace original layer name with exported in the final O…
Browse files Browse the repository at this point in the history
…GR command (fix #15099)

(cherry picked from commit c81b14d)
  • Loading branch information
alexbruy committed Jun 22, 2016
1 parent fa524a2 commit 78881d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/processing/algs/gdal/GdalAlgorithm.py
Expand Up @@ -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)
Expand Down

0 comments on commit 78881d6

Please sign in to comment.