ledok mac zip

This commit is contained in:
Gangphon 2023-05-05 16:10:49 +08:00
parent 3c2bec09d0
commit e7a5c0cf8d

View File

@ -99,9 +99,13 @@ void GenTmpThread::run() {
if(! password.isEmpty()) args << "-p"+password;
QProcess::execute("7z.exe", args);
#else
QStringList args{"-r", zip_file, dstDir};
if(! password.isEmpty()) args << "-P "+password;
QProcess::execute("zip", args);
QStringList args{"-r", zip_file};
if(! password.isEmpty()) args << "-P" << password;
args += QDir(dstDir).entryList(QDir::AllEntries | QDir::NoDotAndDotDot);
QProcess process;
process.setWorkingDirectory(dstDir);
process.start("zip", args);
process.waitForFinished();
#endif
}
}