You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user