GKeyFile: Accept empty files

It already accepts files consisting solely of whitespace.

https://bugzilla.gnome.org/show_bug.cgi?id=663432
This commit is contained in:
Jürg Billeter 2011-11-04 22:48:56 +01:00 committed by Matthias Clasen
parent a0c755710c
commit fcffe6abbb

View File

@ -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);