mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +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>
|
||||
|
||||
* gcontenttype.c:
|
||||
|
@ -1215,7 +1215,7 @@ get_content_type (const char *basename,
|
||||
|
||||
res = read (fd, sniff_buffer, sniff_length);
|
||||
close (fd);
|
||||
if (res > 0)
|
||||
if (res >= 0)
|
||||
{
|
||||
g_free (content_type);
|
||||
content_type = g_content_type_guess (basename, sniff_buffer, res, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user