| 571 | } |
| 572 | |
| 573 | void |
| 574 | ZipArchive::AddDirectory(std::string const& dirName) |
| 575 | { |
| 576 | assert(dirName[dirName.length() - 1] == '/'); |
| 577 | if (archivedDirs.insert(dirName).second) |
| 578 | { |
| 579 | std::clog << "\t new dir entry " << dirName << std::endl; |
| 580 | // The directory entry does not yet exist, so add it |
| 581 | if (!mz_zip_writer_add_mem(writeArchive.get(), dirName.c_str(), NULL, 0, MZ_NO_COMPRESSION)) |
| 582 | { |
| 583 | throw std::runtime_error("zip add_mem error"); |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | ZipArchive::~ZipArchive() |
| 589 | { |