mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
Fix scanning of files with non-latin chars in their names
This commit is contained in:
@@ -33,6 +33,8 @@
|
|||||||
#include "SourceList.h"
|
#include "SourceList.h"
|
||||||
#include "TomahawkSettings.h"
|
#include "TomahawkSettings.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
@@ -405,7 +407,7 @@ MusicScanner::readTags( const QFileInfo& fi )
|
|||||||
return QVariantMap(); // invalid extension
|
return QVariantMap(); // invalid extension
|
||||||
|
|
||||||
#ifdef COMPLEX_TAGLIB_FILENAME
|
#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
|
#else
|
||||||
QByteArray fileName = QFile::encodeName( fi.canonicalFilePath() );
|
QByteArray fileName = QFile::encodeName( fi.canonicalFilePath() );
|
||||||
const char *encodedName = fileName.constData();
|
const char *encodedName = fileName.constData();
|
||||||
|
@@ -23,5 +23,6 @@
|
|||||||
#cmakedefine QCA2_FOUND
|
#cmakedefine QCA2_FOUND
|
||||||
|
|
||||||
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
|
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
|
||||||
|
#cmakedefine COMPLEX_TAGLIB_FILENAME
|
||||||
|
|
||||||
#endif // CONFIG_H_IN
|
#endif // CONFIG_H_IN
|
||||||
|
Reference in New Issue
Block a user