mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Unarr: support unicode filenames
This commit is contained in:
parent
169904421c
commit
2250422cb6
@ -4,16 +4,17 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "extract_delegate.h"
|
#include "extract_delegate.h"
|
||||||
|
|
||||||
extern"C" {
|
|
||||||
#include <unarr.h>
|
#include <unarr.h>
|
||||||
}
|
|
||||||
|
|
||||||
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
||||||
QObject(parent),valid(false),tools(true),numFiles(0),ar(NULL),stream(NULL)
|
QObject(parent),valid(false),tools(true),numFiles(0),ar(NULL),stream(NULL)
|
||||||
{
|
{
|
||||||
//open file
|
//open file
|
||||||
stream = ar_open_file(filePath.toStdString().c_str());
|
#ifdef Q_OS_WIN
|
||||||
|
stream = ar_open_file_w((wchar_t *)filePath.utf16());
|
||||||
|
#else
|
||||||
|
stream = ar_open_file(filePath.toLocal8Bit().constData());
|
||||||
|
#endif
|
||||||
if (!stream)
|
if (!stream)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user