diff --git a/3rdparty/interface/archiveinterface/cliinterface.cpp b/3rdparty/interface/archiveinterface/cliinterface.cpp index 47ff92a0..2be283ba 100644 --- a/3rdparty/interface/archiveinterface/cliinterface.cpp +++ b/3rdparty/interface/archiveinterface/cliinterface.cpp @@ -111,8 +111,7 @@ PluginFinishType CliInterface::extractFiles(const QList &files, const qInfo() << "解压目标路径 --- " << destPath; } bool bHandleLongName = false; - Common com; - bool bDlnfs = com.isSubpathOfDlnfs(options.strTargetPath); + bool bDlnfs = m_common->isSubpathOfDlnfs(options.strTargetPath); QDir::setCurrent(destPath); if (!m_extractOptions.bAllExtract) { // 提取部分文件 m_files.clear(); diff --git a/3rdparty/libarchive/libarchive/libarchiveplugin.cpp b/3rdparty/libarchive/libarchive/libarchiveplugin.cpp index e33a116f..7900701c 100644 --- a/3rdparty/libarchive/libarchive/libarchiveplugin.cpp +++ b/3rdparty/libarchive/libarchive/libarchiveplugin.cpp @@ -163,7 +163,7 @@ PluginFinishType LibarchivePlugin::extractFiles(const QList &files, c struct archive_entry *entry = nullptr; QString extractDst; - + bool bDlnfs = m_common->isSubpathOfDlnfs(options.strTargetPath); // Iterate through all entries in archive. int iIndex = 0; // 存储索引值 while (!QThread::currentThread()->isInterruptionRequested() && (archive_read_next_header(m_archiveReader.data(), &entry) == ARCHIVE_OK)) { @@ -260,11 +260,8 @@ PluginFinishType LibarchivePlugin::extractFiles(const QList &files, c bool bLongName = false; QString tempFilePathName; QString strOriginName = entryName; - - Common com; - bool bDlnfs = com.isSubpathOfDlnfs(options.strTargetPath); if(!bDlnfs) { - QString sDir = com.handleLongNameforPath(strFilePath, entryName, m_mapLongDirName, m_mapRealDirValue); + QString sDir = m_common->handleLongNameforPath(strFilePath, entryName, m_mapLongDirName, m_mapRealDirValue); if(sDir.length() > 0) { strFilePath = sDir.endsWith(QDir::separator())?sDir.left(sDir.length() -1):sDir; if(entryName.endsWith(QDir::separator())) { diff --git a/3rdparty/libzipplugin/libzipplugin.cpp b/3rdparty/libzipplugin/libzipplugin.cpp index d18711ba..c872778c 100644 --- a/3rdparty/libzipplugin/libzipplugin.cpp +++ b/3rdparty/libzipplugin/libzipplugin.cpp @@ -152,6 +152,7 @@ PluginFinishType LibzipPlugin::extractFiles(const QList &files, const } else { m_dScaleSize = 100.0 / options.qSize; } + m_bDlnfs = m_common->isSubpathOfDlnfs(options.strTargetPath); // 执行解压操作 bool bHandleLongName = false; @@ -784,10 +785,8 @@ ErrorType LibzipPlugin::extractEntry(zip_t *archive, zip_int64_t index, const Ex } QString tempFilePathName; - Common com; - bool bDlnfs = com.isSubpathOfDlnfs(options.strTargetPath); - if(!bDlnfs) { - QString sDir = com.handleLongNameforPath(strFilePath, strFileName, m_mapLongDirName, m_mapRealDirValue); + if(!m_bDlnfs) { + QString sDir = m_common->handleLongNameforPath(strFilePath, strFileName, m_mapLongDirName, m_mapRealDirValue); if(sDir.length() > 0) { strFilePath = sDir.endsWith(QDir::separator())?sDir.left(sDir.length() -1):sDir; if(strFileName.endsWith(QDir::separator())) { diff --git a/3rdparty/libzipplugin/libzipplugin.h b/3rdparty/libzipplugin/libzipplugin.h index 1398f879..e190fb55 100644 --- a/3rdparty/libzipplugin/libzipplugin.h +++ b/3rdparty/libzipplugin/libzipplugin.h @@ -197,6 +197,7 @@ class LibzipPlugin : public ReadWriteArchiveInterface QMap m_mapLongDirName; // 长文件夹统计 QMap m_mapRealDirValue; // 长文件真实文件统计 QSet m_setLongName; // 存储被截取之后的文件名称(包含001之类的) + bool m_bDlnfs = false; //文件系统是否支持长文件 }; #endif // LIBZIPPLUGIN_H