| 34 | } |
| 35 | } |
| 36 | void check_stream( |
| 37 | const std::ifstream& f, |
| 38 | const std::string filename, |
| 39 | const std::string action) { |
| 40 | if (!f.good()) { |
| 41 | throw std::runtime_error( |
| 42 | std::string("TARReader: error " + action + " archive <") + filename + |
| 43 | ">"); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | struct TARHeader { |
| 48 | char filename[100]; // 0-terminated |