| 524 | } |
| 525 | |
| 526 | bool PackingInfo::Packing(int target, const String& srcFilepath, const String& dstFilepath, const std::vector<int>& handlerSubcodes, const std::vector<StringView>& variables) const |
| 527 | { |
| 528 | String csTempFileName = srcFilepath; |
| 529 | if (!pack(target, csTempFileName, dstFilepath, handlerSubcodes, variables)) |
| 530 | return false; |
| 531 | try |
| 532 | { |
| 533 | if (!paths::IsURL(dstFilepath)) |
| 534 | { |
| 535 | TFile file1(csTempFileName); |
| 536 | file1.copyTo(dstFilepath); |
| 537 | if (srcFilepath != csTempFileName) |
| 538 | file1.remove(); |
| 539 | } |
| 540 | return true; |
| 541 | } |
| 542 | catch (Poco::Exception& e) |
| 543 | { |
| 544 | DWORD dwErrCode = GetLastError(); |
| 545 | RootLogger::Error(e.displayText()); |
| 546 | SetLastError(dwErrCode); |
| 547 | return false; |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | bool PackingInfo::Unpacking(int target, std::vector<int>* handlerSubcodes, String& filepath, const String& filteredText, const std::vector<StringView>& variables) |
| 552 | { |
no test coverage detected