mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
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:
parent
a0c755710c
commit
fcffe6abbb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user