summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2011-11-04 22:48:56 +0100
committerMatthias Clasen <mclasen@redhat.com>2011-11-17 23:11:41 -0500
commitfcffe6abbb1363b4645752ef2f06c098767f2194 (patch)
tree2f9a5c9381feb76ee72e6dfc39cfa2d1866cf3af /glib
parenta0c755710cdf3e06622b34e10088d4209189e6f9 (diff)
downloadglib-fcffe6abbb1363b4645752ef2f06c098767f2194.tar.gz
GKeyFile: Accept empty files
It already accepts files consisting solely of whitespace. https://bugzilla.gnome.org/show_bug.cgi?id=663432
Diffstat (limited to 'glib')
-rw-r--r--glib/gkeyfile.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 20de0d8d0..dc4faf312 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);