Skip to content

Commit 19780c4

Browse files
committedNov 27, 2016
[processing] fixed file extension when exporting layer
fixes #15898
1 parent 912a7eb commit 19780c4

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
@@ -308,7 +308,8 @@ def exportVectorLayer(layer, supported=None):
308308
unicode(layer.source()).decode('ascii')
309309
except UnicodeEncodeError:
310310
isASCII = False
311-
if not os.path.splitext(layer.source())[1].lower() in supported or not isASCII:
311+
ext = os.path.splitext(layer.source())[-1].lower()[1:]
312+
if ext not in supported or not isASCII:
312313
writer = QgsVectorFileWriter(
313314
output, systemEncoding,
314315
layer.pendingFields(), provider.geometryType(),

0 commit comments

Comments
 (0)
Please sign in to comment.