I get the 'Illegal characters in path.' exception when creating an instance of TagLib.Gif.File object for some GIF files in the samples directory. The exception comes from the line 268 in XmpTag.cs file. When I replace
XDocument.Load(data) with XDocument.Parse(data)
this exception goes away.
However, a new exception, 'Cannot change named node' is raised in the ParseRDF function in line 302, when setting top.Name = attr.Value.
The Name property setter in XmpNode.cs explicitly forbids changing a name field in the case of a non-null value, so it's unclear why is it written like this. Changing the line
if (name != null)
to
if (!String.IsNullOrWhiteSpace(name))
seems to solve this.
I get the
'Illegal characters in path.'
exception when creating an instance ofTagLib.Gif.File
object for some GIF files in thesamples
directory. The exception comes from the line 268 inXmpTag.cs
file. When I replaceXDocument.Load(data)
withXDocument.Parse(data)
this exception goes away. However, a new exception,'Cannot change named node'
is raised in theParseRDF
function in line 302, when settingtop.Name = attr.Value
. TheName
property setter inXmpNode.cs
explicitly forbids changing aname
field in the case of a non-null value, so it's unclear why is it written like this. Changing the lineif (name != null)
toif (!String.IsNullOrWhiteSpace(name))
seems to solve this.