| 3510 | |
| 3511 | |
| 3512 | bool WizDatabase::updateDocumentDataWithFolder(WIZDOCUMENTDATA& data, |
| 3513 | const QString& strFolder, |
| 3514 | bool notifyDataModify /*= true*/) |
| 3515 | { |
| 3516 | CString strZipFileName = getDocumentFileName(data.strGUID); |
| 3517 | if (!data.nProtected) { |
| 3518 | bool bZip = ::WizFolder2Zip(strFolder, strZipFileName); |
| 3519 | if (!bZip) { |
| 3520 | return false; |
| 3521 | } |
| 3522 | } else { |
| 3523 | CString strTempFile = Utils::WizPathResolve::tempPath() + data.strGUID + "-decrypted"; |
| 3524 | bool bZip = ::WizFolder2Zip(strFolder, strTempFile); |
| 3525 | if (!bZip) { |
| 3526 | return false; |
| 3527 | } |
| 3528 | |
| 3529 | if (!m_ziwReader->encryptFileToFile(strTempFile, strZipFileName)) { |
| 3530 | return false; |
| 3531 | } |
| 3532 | } |
| 3533 | |
| 3534 | setObjectDataDownloaded(data.strGUID, "document", true); |
| 3535 | |
| 3536 | return updateDocumentDataMD5(data, strZipFileName, notifyDataModify); |
| 3537 | } |
| 3538 | |
| 3539 | void WizDatabase::clearUnusedImages(const QString& strHtml, const QString& strFilePath) |
| 3540 | { |
no test coverage detected