diff --git a/gio/ChangeLog b/gio/ChangeLog index 0a3435a9e..af71aaa9c 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,9 @@ +2008-02-29 Alexander Larsson + + * glocalfileinfo.c: + (get_content_type): + Make sure empty files get text/plain type (#518720) + 2008-02-27 Alexander Larsson * gcontenttype.c: diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 9c4538c11..4553ded1b 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.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);