mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] replace original layer name with exported in the final OGR command (fix #15099)
This commit is contained in:
parent
740d9fb388
commit
c81b14d59e
@ -54,7 +54,12 @@ class GdalAlgorithm(GeoAlgorithm):
|
|||||||
for i, c in enumerate(commands):
|
for i, c in enumerate(commands):
|
||||||
for layer in layers:
|
for layer in layers:
|
||||||
if layer.source() in c:
|
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
|
commands[i] = c
|
||||||
GdalUtils.runGdal(commands, progress)
|
GdalUtils.runGdal(commands, progress)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user