Skip to content

Commit

Permalink
[DBmanager] add extension to file when exporting (fix #13733)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jan 15, 2016
1 parent 62d079c commit e20cfc0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/plugins/db_manager/dlg_export_vector.py
Expand Up @@ -79,6 +79,13 @@ def chooseOutputFile(self):
if filename == "":
return

filterString = qgis.core.QgsVectorFileWriter.filterForDriver(selectedFilter)
ext = filterString[filterString.find('.'):]
ext = ext[:ext.find(' ')]

if not filename.lower().endswith(ext):
filename += ext

# store the last used dir
settings.setValue(self.lastUsedVectorDirSettingsKey, QFileInfo(filename).filePath())

Expand Down

0 comments on commit e20cfc0

Please sign in to comment.