GPaste icon indicating copy to clipboard operation
GPaste copied to clipboard

daemon: Improve warning for history parser state errors

Open jtojnar opened this issue 2 years ago • 2 comments

This will make it easier to fix corrupted history files.

For example, with this fix I get:

Expected state 5, but got 4 in file “/home/jtojnar/.local/share/GPaste/history.xml” at line 5117, column 1.

which pointed me to:

<item kind="Text" uuid="27eff152-c01a-49bd-8e55-4dbad47f63c9">
  <value><![CDATA[previousAttrs]]></value>
  <value mime="text-html"><![CDATA[]]></value>
</item>

jtojnar avatar May 14 '22 22:05 jtojnar

Ideally, we would also use names for the parser states but that would probably require either manual conversion table or something like glib-mkenums.

jtojnar avatar May 14 '22 22:05 jtojnar

Thanks, will give it a look next week

Keruspe avatar May 15 '22 07:05 Keruspe