mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
Fix scanning of files with non-latin chars in their names
This commit is contained in:
parent
63884bf74b
commit
223be945eb
@ -33,6 +33,8 @@
|
||||
#include "SourceList.h"
|
||||
#include "TomahawkSettings.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
@ -405,7 +407,7 @@ MusicScanner::readTags( const QFileInfo& fi )
|
||||
return QVariantMap(); // invalid extension
|
||||
|
||||
#ifdef COMPLEX_TAGLIB_FILENAME
|
||||
const wchar_t *encodedName = reinterpret_cast< const wchar_t * >( fi.canonicalFilePath().utf16() );
|
||||
const wchar_t *encodedName = fi.canonicalFilePath().toStdWString().c_str();
|
||||
#else
|
||||
QByteArray fileName = QFile::encodeName( fi.canonicalFilePath() );
|
||||
const char *encodedName = fileName.constData();
|
||||
|
@ -23,5 +23,6 @@
|
||||
#cmakedefine QCA2_FOUND
|
||||
|
||||
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
|
||||
#cmakedefine COMPLEX_TAGLIB_FILENAME
|
||||
|
||||
#endif // CONFIG_H_IN
|
||||
|
Loading…
x
Reference in New Issue
Block a user