mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
macos: Fill appUrl directly
No need to convert it to a char* first. This also avoids threading issues with OsxAppInfo's get_filename() method.
This commit is contained in:
parent
71e87fc29c
commit
9f0ff882c1
@ -278,16 +278,11 @@ create_urlspec_for_appinfo (GOsxAppInfo *info,
|
||||
gboolean are_files)
|
||||
{
|
||||
LSLaunchURLSpec *urlspec = NULL;
|
||||
const gchar *app_cstr;
|
||||
|
||||
g_return_val_if_fail (G_IS_OSX_APP_INFO (info), NULL);
|
||||
|
||||
urlspec = g_new0 (LSLaunchURLSpec, 1);
|
||||
app_cstr = g_osx_app_info_get_filename (info);
|
||||
g_assert (app_cstr != NULL);
|
||||
|
||||
/* Strip file:// from app url but ensure filesystem url */
|
||||
urlspec->appURL = create_url_from_cstr (app_cstr + strlen ("file://"), TRUE);
|
||||
urlspec->appURL = CFURLCreateWithFileSystemPath (NULL, CFBridgingRetain([info->bundle bundlePath]), kCFURLPOSIXPathStyle, FALSE);
|
||||
urlspec->launchFlags = kLSLaunchDefaults;
|
||||
urlspec->itemURLs = create_url_list_from_glist (uris, are_files);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user