OSDN Git Service

ark: replace archive_entry_pathname_w() with archive_entry_pathname_utf8()
authorIvailo Monev <xakepa10@laimg.moc>
Fri, 29 Nov 2019 02:24:18 +0000 (02:24 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Fri, 29 Nov 2019 02:24:18 +0000 (02:24 +0000)
archive_entry_pathname_w() is supposedly going to be removed/deprecated in
libarchive v4, see bottom of:
https://github.com/libarchive/libarchive/wiki/Filenames

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
ark/plugins/libarchive/libarchivehandler.cpp

index 204ae81..34b752c 100644 (file)
@@ -631,7 +631,7 @@ void LibArchiveInterface::emitEntryFromArchiveEntry(struct archive_entry *aentry
 {
     ArchiveEntry e;
 
-    e[FileName] = QDir::fromNativeSeparators(QString::fromWCharArray(archive_entry_pathname_w(aentry)));
+    e[FileName] = QDir::fromNativeSeparators(QString::fromUtf8(archive_entry_pathname_utf8(aentry)));
     e[InternalID] = e[FileName];
 
     const QString owner = QString::fromAscii(archive_entry_uname(aentry));