mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-28 12:17:57 +03:00
main-executable: handle empty string being passed to --uri
The XDG-portal escapes the strings when installing a .desktop file. This causes --uri %u to be replaced with --uri '%u', which causes an empty string to be passed when no URI is specified.
This commit is contained in:
parent
e2f41610de
commit
6162868bd1
1 changed files with 1 additions and 1 deletions
|
@ -431,7 +431,7 @@ static void open(GtkApplication *app, GFile **files, gint nfiles, const gchar *h
|
|||
// construct main Activity
|
||||
activity_object = (*env)->CallStaticObjectMethod(env, handle_cache.activity.class,
|
||||
_STATIC_METHOD(handle_cache.activity.class, "createMainActivity", "(Ljava/lang/String;JLjava/lang/String;)Landroid/app/Activity;"),
|
||||
_JSTRING(d->apk_main_activity_class), _INTPTR(window), uri_option ? _JSTRING(uri_option) : NULL);
|
||||
_JSTRING(d->apk_main_activity_class), _INTPTR(window), (uri_option && *uri_option) ? _JSTRING(uri_option) : NULL);
|
||||
if ((*env)->ExceptionCheck(env))
|
||||
(*env)->ExceptionDescribe(env);
|
||||
if (uri_option)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue