MCPcopy Create free account
hub / github.com/Parchive/par2cmdline / LoadMainPacket

Method LoadMainPacket

src/par2repairer.cpp:702–720  ·  view source on GitHub ↗

Finish loading the main packet

Source from the content-addressed store, hash-verified

700
701// Finish loading the main packet
702bool Par2Repairer::LoadMainPacket(DiskFile *diskfile, u64 offset, PACKET_HEADER &header)
703{
704 // Do we already have a main packet
705 if (0 != mainpacket)
706 return false;
707
708 MainPacket *packet = new MainPacket;
709
710 // Load the packet from disk;
711 if (!packet->Load(diskfile, offset, header))
712 {
713 delete packet;
714 return false;
715 }
716
717 mainpacket = packet;
718
719 return true;
720}
721
722// Finish loading the creator packet
723bool Par2Repairer::LoadCreatorPacket(DiskFile *diskfile, u64 offset, PACKET_HEADER &header)

Callers

nothing calls this directly

Calls 1

LoadMethod · 0.45

Tested by

no test coverage detected