Re: bug in g_content_type_guess



2010/2/6 Shixin Zeng <zeng shixin gmail com>:
> from http://git.gnome.org/browse/glib/tree/gio/gcontenttype.c
> we have the definition for this function as below, where
> *result_uncertain is never assigned.
>
> char *
> g_content_type_guess (const char   *filename,
>                      const guchar *data,
>                      gsize         data_size,
>                      gboolean     *result_uncertain)
> {
>  char *basename;
>  char *type;
>  char *dot;
>
>  type = NULL;
>
>  if (filename)
>    {
>      basename = g_path_get_basename (filename);
>      dot = strrchr (basename, '.');
>      if (dot)
>        type = g_strdup (dot);
>      g_free (basename);
>    }
>
>  if (type)
>    return type;
>
>  if (data && looks_like_text (data, data_size))
>    return g_strdup (".txt");
>
>  return g_strdup ("*");
> }
>
>
> Best Regards
>
> Shixin Zeng
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>

Hello,

bug report created here:
https://bugzilla.gnome.org/show_bug.cgi?id=609143

Thanks,
-- 
Javier Jardón Cabezas


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]