Do not allow resuming for images version older than V2.

This commit is contained in:
2025-10-21 14:22:14 +01:00
parent f7da1e27bd
commit fc1aed3292

View File

@@ -198,6 +198,15 @@ AARU_EXPORT void AARU_CALL *aaruf_open(const char *filepath, const bool resume_m
return NULL;
}
if(ctx->header.imageMajorVersion < AARUF_VERSION_V2 && resume_mode)
{
TRACE("Cannot write to old images");
cleanup_open_failure(ctx);
errno = AARUF_ERROR_INCOMPATIBLE_VERSION;
TRACE("Exiting aaruf_open() = NULL");
return NULL;
}
// Read new header version
if(ctx->header.imageMajorVersion >= AARUF_VERSION_V2)
{