Skip to content

Commit

Permalink
fix: tar.gz优化速度
Browse files Browse the repository at this point in the history
tar.gz优化速度

Bug: https://pms.uniontech.com/bug-view-269225.html
Log: tar.gz优化速度
  • Loading branch information
myk1343 committed Sep 25, 2024
1 parent 282073e commit 958a8f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions 3rdparty/libpigzplugin/libpigzplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ PluginFinishType LibPigzPlugin::addFiles(const QList<FileEntry> &files, const Co
strTmparchive.replace(strold[n], strnew[n]);
}

QString strTemp = QString("tar cvfz - %1 | pigz -p %2 -%3 > %4").arg(strFileName).arg(options.iCPUTheadNum).arg(options.iCompressionLevel).arg(strTmparchive);
if(0 == options.iCompressionLevel) {
strTemp = QString("tar cvf - %1 | pigz -p %2 -%3 > %4").arg(strFileName).arg(options.iCPUTheadNum).arg(options.iCompressionLevel).arg(strTmparchive);
}
QString strTemp = QString("tar cvf - %1 | pigz -p %2 -%3 > %4").arg(strFileName).arg(options.iCPUTheadNum).arg(options.iCompressionLevel).arg(strTmparchive);

QStringList slist = QStringList() << "-c" << strTemp;
m_process->setProgram(QStandardPaths::findExecutable("bash"), slist);
Expand Down

0 comments on commit 958a8f7

Please sign in to comment.