MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / DiscardLastEntry

Method DiscardLastEntry

Bcore/src/main/cpp/ziparchive/zip_writer.cc:268–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268int32_t ZipWriter::DiscardLastEntry() {
269 if (state_ != State::kWritingZip || files_.empty()) {
270 return kInvalidState;
271 }
272
273 FileEntry& last_entry = files_.back();
274 current_offset_ = last_entry.local_file_header_offset;
275 if (fseeko(file_, current_offset_, SEEK_SET) != 0) {
276 return HandleError(kIoError);
277 }
278 files_.pop_back();
279 return kNoError;
280}
281
282int32_t ZipWriter::GetLastEntry(FileEntry* out_entry) {
283 CHECK(out_entry != nullptr);

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected