Merge lp:~midori/midori/noDescFile into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: André Stösel
Approved revision: 6633
Merged at revision: 6652
Proposed branch: lp:~midori/midori/noDescFile
Merge into: lp:midori
Diff against target: 16 lines (+5/-1)
1 file modified
extensions/apps.vala (+5/-1)
To merge this branch: bzr merge lp:~midori/midori/noDescFile
Reviewer Review Type Date Requested Status
André Stösel Approve
Review via email: mp+213373@code.launchpad.net

Commit message

Distinguish between desc file missing and other parsing issues

To post a comment you must log in.
Revision history for this message
André Stösel (ivaldi) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/apps.vala'
2--- extensions/apps.vala 2014-03-15 00:36:39 +0000
3+++ extensions/apps.vala 2014-03-29 21:37:55 +0000
4@@ -168,7 +168,11 @@
5
6 bool init (GLib.Cancellable? cancellable) throws GLib.Error {
7 var keyfile = new GLib.KeyFile ();
8- keyfile.load_from_file (file.get_child ("desc").get_path (), GLib.KeyFileFlags.NONE);
9+ try {
10+ keyfile.load_from_file (file.get_child ("desc").get_path (), GLib.KeyFileFlags.NONE);
11+ } catch (Error desc_error) {
12+ throw new FileError.EXIST (_("No file \"desc\" found"));
13+ }
14
15 exec = keyfile.get_string ("Desktop Entry", "Exec");
16 if (!exec.has_prefix (APP_PREFIX) && !exec.has_prefix (PROFILE_PREFIX))

Subscribers

People subscribed via source and target branches

to all changes: