Skip to content

Commit

Permalink
Merge branch 'main' into release-7.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zeebok authored Aug 21, 2023
2 parents fe896bf + 5642383 commit a457a48
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Background/Portal.vala
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ public class Background.Portal : Object {
}

var key_file = new KeyFile ();

if (file.query_exists ()) {
try {
uint8[] contents;
yield file.load_contents_async (null, out contents, null);

key_file.load_from_data ((string) contents, contents.length, KEEP_COMMENTS | KEEP_TRANSLATIONS);
} catch (Error e) {
warning ("Failed to load exisiting autostart file: %s", e.message);
}
}

key_file.set_string (KeyFileDesktop.GROUP, KeyFileDesktop.KEY_TYPE, KeyFileDesktop.TYPE_APPLICATION);

if (app_info != null) {
Expand Down

0 comments on commit a457a48

Please sign in to comment.