gosxappinfo: Correctly return an error from create_from_commandline()

Creating a `GAppInfo` from a commandline isn’t currently supported on
macOS, but the implementation was incorrectly returning `NULL` without
setting the `GError`.

This was being caught by the new tests in `gio/tests/file.c`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-06-24 12:17:37 +01:00
parent a98bd895d5
commit dbdc9ca995

View File

@ -587,6 +587,9 @@ g_app_info_create_from_commandline (const char *commandline,
GAppInfoCreateFlags flags,
GError **error)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
"Creating an app info from a command line not currently supported");
return NULL;
}