Skip to content

Commit

Permalink
[processing] fixed file extension when exporting layer
Browse files Browse the repository at this point in the history
fixes #15898
  • Loading branch information
volaya committed Nov 27, 2016
1 parent 912a7eb commit 19780c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/plugins/processing/tools/dataobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ def exportVectorLayer(layer, supported=None):
unicode(layer.source()).decode('ascii')
except UnicodeEncodeError:
isASCII = False
if not os.path.splitext(layer.source())[1].lower() in supported or not isASCII:
ext = os.path.splitext(layer.source())[-1].lower()[1:]
if ext not in supported or not isASCII:
writer = QgsVectorFileWriter(
output, systemEncoding,
layer.pendingFields(), provider.geometryType(),
Expand Down

0 comments on commit 19780c4

Please sign in to comment.