Skip to content

Commit

Permalink
playlist export: add missing file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Nov 19, 2021
1 parent abbfb22 commit 66a1695
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/library/baseplaylistfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,14 @@ void BasePlaylistFeature::slotExportPlaylist() {
if (file_location.isNull() || file_location.isEmpty()) {
return;
}
// if the extension was not added add it manually
// https://bugreports.qt.io/browse/QTBUG-27186
QFileInfo fileName(file_location);
if (fileName.suffix().isNull() || fileName.suffix().isEmpty()) {
QString ext = filefilter.section(".", 1, 1);
ext.chop(1);
file_location.append(".").append(ext);
}
// Update the import/export playlist directory
m_pConfig->set(ConfigKey("[Library]", "LastImportExportPlaylistDirectory"),
ConfigValue(fileName.dir().absolutePath()));
Expand Down

0 comments on commit 66a1695

Please sign in to comment.