Skip to content

Commit 7613c29

Browse files
committed
[processing] fixed file extension when exporting layer
fixes #15898
1 parent 739e2aa commit 7613c29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/plugins/processing/tools/dataobjects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ def exportVectorLayer(layer, supported=None):
309309
unicode(layer.source()).decode('ascii')
310310
except UnicodeEncodeError:
311311
isASCII = False
312-
if not os.path.splitext(layer.source())[1].lower() in supported or not isASCII:
312+
ext = os.path.splitext(layer.source())[-1].lower()[1:]
313+
if ext not in supported or not isASCII:
313314
writer = QgsVectorFileWriter(
314315
output, systemEncoding,
315316
layer.pendingFields(), provider.geometryType(),

0 commit comments

Comments
 (0)