mirror of
https://github.com/VARCem/MiniVHD.git
synced 2026-09-23 23:35:17 +00:00
Make mismatched timestamps non-fatal
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user