summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-11-13 09:19:07 +0000
committerRichard Hughes <richard@hughsie.com>2014-11-13 09:19:09 +0000
commite96d6ddfe46105bd31b4c2f61f80cc6fb128408c (patch)
treeaee0d8514cf0d1889f4ed5dceee24e2b608922f0 /data
parent0c759417a883e6cf16fe512bbf3dd75ce2bdd053 (diff)
downloadappstream-glib-e96d6ddfe46105bd31b4c2f61f80cc6fb128408c.tar.gz
Do not fail to load all the desktop files if one is bad
Parsing a broken or invalid desktop file should return an error code we can handle, typically by logging and carrying on parsing the other files.
Diffstat (limited to 'data')
-rw-r--r--data/tests/Makefile.am1
-rw-r--r--data/tests/usr/share/applications/broken.desktop7
2 files changed, 8 insertions, 0 deletions
diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
index 839821f..70e5b08 100644
--- a/data/tests/Makefile.am
+++ b/data/tests/Makefile.am
@@ -33,6 +33,7 @@ test_files = \
usr/share/app-install/desktop/test.desktop \
usr/share/app-install/icons/aequorea/iceweasel.png \
usr/share/app-install/icons/test.png \
+ usr/share/applications/broken.desktop \
usr/share/applications/test.desktop \
usr/share/icons/hicolor/64x64/apps/test2.png \
usr/share/icons/hicolor/128x128/apps/test3.png \
diff --git a/data/tests/usr/share/applications/broken.desktop b/data/tests/usr/share/applications/broken.desktop
new file mode 100644
index 0000000..d5d7fe5
--- /dev/null
+++ b/data/tests/usr/share/applications/broken.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Comment=A test broken GKeyFile
+Exec=GKeyFile
+Icon=128x128.png
+Name=Broken GKeyFile
+Path[$e]=
+Type=Application