示例#1
0
void CDiskPartHandlerBase::stop()
{
    if (!eoi)
        checkFileCrc = false; // cannot perform file CRC if diskread has not read whole file.
    CRC32 fileCRC;
    close(fileCRC);
    if (!activity.abortSoon && checkFileCrc)
    {
        ActPrintLog(&activity, "%s[part=%d]: CRC Stored=%x, calculated=%x file(%s)", kindStr, which, storedCrc, fileCRC.get(), filename.get());
        if (fileCRC.get() != storedCrc)
            throw MakeThorOperatorException(TE_FileCrc, "CRC Failure having read file: %s", filename.get());
        checkFileCrc = false;
    }
}