﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
5157	RTUuidFromUtf16 implementation is too draconian, and the error reporting is poor	Kohsuke Kawaguchi		"The implementation doesn't accept typical variants like ""{936244ab-ddf7-4ea4-a439-d0c0ccb9ee46}"" (with brackets) or ""936244abddf74ea4a439d0c0ccb9ee46"" (without hyphen), even though VirtualBox uses some of these formats by itself, as can be seen in the following error message:

  : 0x80070057 (Cannot register the hard disk '/tmp/slave1/distfork4413096236958589915.tmp/applianceBuilder/key.vmdk' with UUID {936244ab-ddf7-4ea4-a439-d0c0ccb9ee46} because a hard disk '/home/kohsuke/ws/aklite/builder/applianceBuilder/key.vmdk' with UUID {936244ab-ddf7-4ea4-a439-d0c0ccb9ee46} already exists in the media registry ('/home/kohsuke/.VirtualBox/VirtualBox.xml'))

Furthermore, failing to parse an UUID often doesn't result in an error right away, and instead VirtualBox moves on as if the zero UUID is passed --- one such example can be seen in Guid::Guid(const Btr&)

Since often user-specified UUID values are fed directly into here, I suggest RTUuidFromUtf16 to be modified slightly to skip '{', '}' and '-' to accomodate variations in the format. 

I was using Python API for VirtualBox, and Python's UUID support uses {-bracketd notation, so this change improves the user experience at multiple levels."	defect	closed	other	VirtualBox 3.0.8	fixed			other	other
