glib r6605 - trunk/gio



Author: alexl
Date: Fri Feb 29 09:49:08 2008
New Revision: 6605
URL: http://svn.gnome.org/viewvc/glib?rev=6605&view=rev

Log:
2008-02-29  Alexander Larsson  <alexl redhat com>

        * glocalfileinfo.c:
        (get_content_type):
	Make sure empty files get text/plain type (#518720)



Modified:
   trunk/gio/ChangeLog
   trunk/gio/glocalfileinfo.c

Modified: trunk/gio/glocalfileinfo.c
==============================================================================
--- trunk/gio/glocalfileinfo.c	(original)
+++ trunk/gio/glocalfileinfo.c	Fri Feb 29 09:49:08 2008
@@ -1215,7 +1215,7 @@
 	      
 	      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);



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