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 "extract_delegate.h"
|
||||
|
||||
extern"C" {
|
||||
#include <unarr.h>
|
||||
}
|
||||
|
||||
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
||||
QObject(parent),valid(false),tools(true),numFiles(0),ar(NULL),stream(NULL)
|
||||
{
|
||||
//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)
|
||||
{
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user