diff --git a/src/libtomahawk/filemetadata/MetadataEditor.cpp b/src/libtomahawk/filemetadata/MetadataEditor.cpp index af561897b..ec784fb9a 100644 --- a/src/libtomahawk/filemetadata/MetadataEditor.cpp +++ b/src/libtomahawk/filemetadata/MetadataEditor.cpp @@ -36,6 +36,7 @@ #include "Source.h" #include "Typedefs.h" +#include "config.h" #include #include @@ -89,8 +90,12 @@ MetadataEditor::writeMetadata( bool closeDlg ) QFileInfo fi( QUrl( m_result->url() ).toLocalFile() ); bool changed = false; +#ifdef COMPLEX_TAGLIB_FILENAME + const wchar_t *encodedName = fi.canonicalFilePath().toStdWString().c_str(); +#else QByteArray fileName = QFile::encodeName( fi.canonicalFilePath() ); const char *encodedName = fileName.constData(); +#endif TagLib::FileRef f( encodedName ); QSharedPointer tag( Tomahawk::Tag::fromFile( f ) );