[glib] GKeyFile: Accept empty files



commit fcffe6abbb1363b4645752ef2f06c098767f2194
Author: JÃrg Billeter <j bitron ch>
Date:   Fri Nov 4 22:48:56 2011 +0100

    GKeyFile: Accept empty files
    
    It already accepts files consisting solely of whitespace.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663432

 glib/gkeyfile.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 20de0d8..dc4faf3 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -766,14 +766,6 @@ g_key_file_load_from_fd (GKeyFile       *key_file,
       return FALSE;
     }
 
-  if (stat_buf.st_size == 0)
-    {
-      g_set_error_literal (error, G_KEY_FILE_ERROR,
-                           G_KEY_FILE_ERROR_PARSE,
-                           _("File is empty"));
-      return FALSE;
-    }
-
   if (key_file->approximate_size > 0)
     {
       g_key_file_clear (key_file);



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