Skip to content

Commit e20cfc0

Browse files
committed
[DBmanager] add extension to file when exporting (fix #13733)
1 parent 62d079c commit e20cfc0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/plugins/db_manager/dlg_export_vector.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ def chooseOutputFile(self):
7979
if filename == "":
8080
return
8181

82+
filterString = qgis.core.QgsVectorFileWriter.filterForDriver(selectedFilter)
83+
ext = filterString[filterString.find('.'):]
84+
ext = ext[:ext.find(' ')]
85+
86+
if not filename.lower().endswith(ext):
87+
filename += ext
88+
8289
# store the last used dir
8390
settings.setValue(self.lastUsedVectorDirSettingsKey, QFileInfo(filename).filePath())
8491

0 commit comments

Comments
 (0)