diff --git a/src/minivhd.h b/src/minivhd.h index 47e30a2..80f0d19 100644 --- a/src/minivhd.h +++ b/src/minivhd.h @@ -95,7 +95,8 @@ bool mvhd_file_is_vhd(FILE* f); * MVHD_ERR_TYPE, MVHD_ERR_TIMESTAMP * If MVHD_ERR_FILE is set, mvhd_errno will be set to the appropriate system errno value * - * \return MVHDMeta pointer. If NULL, check err. + * \return MVHDMeta pointer. If NULL, check err. err may also be set to MVHD_ERR_TIMESTAMP if + * opening a differencing VHD. */ MVHDMeta* mvhd_open(const char* path, bool readonly, int* err); diff --git a/src/minivhd_manage.c b/src/minivhd_manage.c index 9d711cf..fbfe725 100644 --- a/src/minivhd_manage.c +++ b/src/minivhd_manage.c @@ -426,8 +426,9 @@ MVHDMeta* mvhd_open(const char* path, bool readonly, int* err) { goto cleanup_format_buff; } if (vhdm->sparse.par_timestamp != par_mod_ts) { + /* The last-modified timestamp is to fragile to make this a fatal error. + Instead, we inform the caller of the potential problem. */ *err = MVHD_ERR_TIMESTAMP; - goto cleanup_format_buff; } vhdm->parent = mvhd_open(par_path, true, err); if (vhdm->parent == NULL) {