Skip to content

Commit

Permalink
[libcontentaction] Make no-invoker synonymous with generic. JB#54498 …
Browse files Browse the repository at this point in the history
…OMP#JOLLA-178

After this change all apps will go through booster. Generic booster
should not differ much from launching directly but this way we can
better control for example sandboxing.

Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
  • Loading branch information
Tomin1 committed Jun 23, 2021
1 parent 2f873f6 commit d79ec5d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/exec.cpp
Expand Up @@ -68,9 +68,11 @@ ExecPrivate::ExecPrivate(QSharedPointer<MDesktopEntry> desktopEntry,

gchar *boosterType = g_key_file_get_string(keyFile, "Desktop Entry",
"X-Nemo-Application-Type", NULL);
if (boosterType == NULL) {
if (boosterType == NULL || g_strcmp0(boosterType, "no-invoker") == 0) {
// Default booster type is "generic". This can be overridden via
// "X-Nemo-Application-Type=<boostertype>".
// "no-invoker" is synonymous to "generic"
g_free(boosterType);
boosterType = g_strdup("generic");
}

Expand All @@ -83,15 +85,12 @@ ExecPrivate::ExecPrivate(QSharedPointer<MDesktopEntry> desktopEntry,
singleInstance = false;
}

// Set X-Nemo-Application-Type to "no-invoker" to disable invoker
if (g_strcmp0(boosterType, "no-invoker") != 0) {
gchar *invokerString = g_strdup_printf("invoker --type=%s %s %s",
boosterType,
singleInstance ? "--single-instance" : "",
execString);
g_key_file_set_string(keyFile, "Desktop Entry", "Exec", invokerString);
g_free(invokerString);
}
gchar *invokerString = g_strdup_printf("invoker --type=%s %s %s",
boosterType,
singleInstance ? "--single-instance" : "",
execString);
g_key_file_set_string(keyFile, "Desktop Entry", "Exec", invokerString);
g_free(invokerString);

g_free(boosterType);
g_free(singleInstanceValue);
Expand Down

0 comments on commit d79ec5d

Please sign in to comment.