
On 09/06/2011 03:27 PM, Peter Krempa wrote:
While parsing XML strings from memory, the previous convention in libvirt was to set the virtual file name to "domain.xml" or something similar. This could potentialy trick the user into looking for a file named domain.xml on the disk in an attempt to fix the error.
This patch changes these filenames to something that can't be as easily confused for a valid filename. --- For the request for comments:
Shoud we use translation macros around these filename strings? It might be possible to translate these messages in something meaningful in other languages.
Yes, a translated name might be nicer. But I don't like the ALL CAPS; maybe this would be better:
- if ((xml = virXMLParse(filename, xmlStr, "domain.xml"))) { + if ((xml = virXMLParse(filename, xmlStr, "DOMAIN_DEFINITION_XML"))) {
virXMLParse(filename, xmlStr, _("(domain definition)")) that way, the () still make it apparent that this is less likely to be a file name, and the translation has a phrase to translate. Can you update your commit message to give an actual sample of an emitted error message? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org