Skip to content

Commit

Permalink
MythUIWebBrowser: fix mangled filenames when downloading some files
Browse files Browse the repository at this point in the history
This fixes a couple of problems I noticed while downloading coverart in
MythMusic with files that have more than one '.' or an uppercase extension.
  • Loading branch information
Paul Harrison committed Dec 30, 2011
1 parent 58c62e8 commit 30a6a74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuiwebbrowser.cpp
Expand Up @@ -461,7 +461,7 @@ void MythWebView::doDownloadRequested(const QNetworkRequest &request)
// get the filename from the url if available
QFileInfo fi(request.url().path());
QString basename(fi.completeBaseName());
QString extension = fi.suffix();
QString extension = fi.suffix().toLower();
QString mimetype = getReplyMimetype();

// if we have a default filename use that
Expand All @@ -470,7 +470,7 @@ void MythWebView::doDownloadRequested(const QNetworkRequest &request)
if (!m_parentBrowser->GetDefaultSaveFilename().isEmpty())
{
QFileInfo savefi(m_parentBrowser->GetDefaultSaveFilename());
saveBaseName = savefi.baseName();
saveBaseName = savefi.completeBaseName();
}

// if the filename is still empty use a default name
Expand Down

0 comments on commit 30a6a74

Please sign in to comment.