1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

only save diretory if user actually chose one

This commit is contained in:
Leo Franchi 2012-04-14 16:50:15 -04:00
parent d2f6a65eb5
commit 4d02b9945d

View File

@ -47,7 +47,8 @@ LoadXSPFDialog::getLocalFile()
{
const QString path = TomahawkSettings::instance()->importXspfPath();
QString url = QFileDialog::getOpenFileName( this, tr( "Load XSPF File" ), path, tr( "XSPF Files (*.xspf)" ) );
TomahawkSettings::instance()->setImportXspfPath( QFileInfo( url ).absoluteDir().absolutePath() );
if ( !url.isEmpty() )
TomahawkSettings::instance()->setImportXspfPath( QFileInfo( url ).absoluteDir().absolutePath() );
m_ui->lineEdit->setText( url );
}