On 05/22/2017 02:52 PM, Max Reitz wrote:
> The file drivers' *_parse_filename() implementations just strip the
> optional protocol prefix off the filename. However, for e.g.
> "file:foo:bar", this would lead to "foo:bar" being stored as the BDS's
> filename which looks like it should be managed using the "foo" protocol.
> This is especially troublesome if you then try to resolve a backing
> filename based on "foo:bar".
> 
> This issue can only occur if the stripped part is a relative filename
> ("file:/foo:bar" will be shortened to "/foo:bar" and having a slash
> before the first colon means that "/foo" is not recognized as a protocol
> part). Therefore, we can easily fix it by prepending "./" to such
> filenames.

Slick.

Reviewed-by: Eric Blake <[email protected]>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to