Skip to content
Browse files
[processing] replace original layer name with exported in the final O…
…GR command (fix #15099)

(cherry picked from commit c81b14d)
  • Loading branch information
alexbruy committed Jun 22, 2016
1 parent fa524a2 commit 78881d6478cd3088da7daf4f82f1fa5c7ec4ed97
Showing 1 changed file with 6 additions and 1 deletion.
@@ -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 78881d6

Please sign in to comment.