when file size is zero, it returns vmdk format by mistake.
 
vd.cpp:
 
VBOXDDU_DECL(int) VDGetFormat(PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
const char *pszFilename, char **ppszFormat, VDTYPE *penmType)
{
 
if ( RT_SUCCESS(rc)
/* The correct backend has been found, but there is a small
* incompatibility so that the file cannot be used. Stop here
* and signal success - the actual open will of course fail,
* but that will create a really sensible error message. */
|| ( rc != VERR_VD_GEN_INVALID_HEADER
&& rc != VERR_VD_VDI_INVALID_HEADER
&& rc != VERR_VD_VMDK_INVALID_HEADER
&& rc != VERR_VD_ISCSI_INVALID_HEADER
&& rc != VERR_VD_VHD_INVALID_HEADER
&& rc != VERR_VD_RAW_INVALID_HEADER
&& rc != VERR_VD_PARALLELS_INVALID_HEADER
&& rc != VERR_VD_DMG_INVALID_HEADER
&& rc != VERR_EOF))  <=== add this condition
 
}
 
 
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev

Reply via email to