mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Make sure empty files get text/plain type (#518720)
2008-02-29 Alexander Larsson <alexl@redhat.com> * glocalfileinfo.c: (get_content_type): Make sure empty files get text/plain type (#518720) svn path=/trunk/; revision=6605
This commit is contained in:
parent
7d48fb3c81
commit
08c743202a
@ -1,3 +1,9 @@
|
|||||||
|
2008-02-29 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* glocalfileinfo.c:
|
||||||
|
(get_content_type):
|
||||||
|
Make sure empty files get text/plain type (#518720)
|
||||||
|
|
||||||
2008-02-27 Alexander Larsson <alexl@redhat.com>
|
2008-02-27 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* gcontenttype.c:
|
* gcontenttype.c:
|
||||||
|
@ -1215,7 +1215,7 @@ get_content_type (const char *basename,
|
|||||||
|
|
||||||
res = read (fd, sniff_buffer, sniff_length);
|
res = read (fd, sniff_buffer, sniff_length);
|
||||||
close (fd);
|
close (fd);
|
||||||
if (res > 0)
|
if (res >= 0)
|
||||||
{
|
{
|
||||||
g_free (content_type);
|
g_free (content_type);
|
||||||
content_type = g_content_type_guess (basename, sniff_buffer, res, NULL);
|
content_type = g_content_type_guess (basename, sniff_buffer, res, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user