mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 11:12:11 +01:00
Return an error if the uri is bad. (#391370, Maciej Piechotka)
2007-01-02 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (g_bookmark_file_get_app_info): Return an error if the uri is bad. (#391370, Maciej Piechotka) svn path=/trunk/; revision=5192
This commit is contained in:
parent
db9c08d08b
commit
01c3535fe6
@ -1,3 +1,8 @@
|
|||||||
|
2007-01-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/gbookmarkfile.c (g_bookmark_file_get_app_info):
|
||||||
|
Return an error if the uri is bad. (#391370, Maciej Piechotka)
|
||||||
|
|
||||||
2007-01-02 Matthias Clasen <mclasen@redhat.com>
|
2007-01-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/glib.symbols: Guard g_slice_debug_tree_statistics
|
* glib/glib.symbols: Guard g_slice_debug_tree_statistics
|
||||||
|
@ -3306,8 +3306,16 @@ expand_exec_line (const gchar *exec_fmt,
|
|||||||
case 'f':
|
case 'f':
|
||||||
{
|
{
|
||||||
gchar *file = g_filename_from_uri (uri, NULL, NULL);
|
gchar *file = g_filename_from_uri (uri, NULL, NULL);
|
||||||
g_string_append (exec, file);
|
if (file)
|
||||||
g_free (file);
|
{
|
||||||
|
g_string_append (exec, file);
|
||||||
|
g_free (file);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_string_free (exec, TRUE);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '%':
|
case '%':
|
||||||
@ -3385,8 +3393,18 @@ g_bookmark_file_get_app_info (GBookmarkFile *bookmark,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (exec)
|
if (exec)
|
||||||
*exec = expand_exec_line (ai->exec, uri);
|
{
|
||||||
|
*exec = expand_exec_line (ai->exec, uri);
|
||||||
|
if (!*exec)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_BOOKMARK_FILE_ERROR,
|
||||||
|
G_BOOKMARK_FILE_ERROR_INVALID_URI,
|
||||||
|
_("Failed to expand exec line '%s' with URI '%s'"),
|
||||||
|
ai->exec, uri);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
*count = ai->count;
|
*count = ai->count;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user