| 481 | } |
| 482 | |
| 483 | Expected<void> decompressZip( const std::filesystem::path& zipFile, const std::filesystem::path& targetFolder, const char * password ) |
| 484 | { |
| 485 | MR_TIMER; |
| 486 | int err; |
| 487 | AutoCloseZip zip( utf8string( zipFile ).c_str(), ZIP_RDONLY, &err ); |
| 488 | if ( !zip ) |
| 489 | return unexpected( "Cannot open zip, error code: " + std::to_string( err ) ); |
| 490 | |
| 491 | return decompressZip_( zip, targetFolder, password ); |
| 492 | } |
| 493 | |
| 494 | Expected<void> decompressZip( std::istream& zipStream, const std::filesystem::path& targetFolder, const char * password ) |
| 495 | { |