mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-08 10:14:04 +02: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:
committed by
Matthias Clasen
parent
a0c755710c
commit
fcffe6abbb
@@ -766,14 +766,6 @@ g_key_file_load_from_fd (GKeyFile *key_file,
|
|||||||
return FALSE;
|
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)
|
if (key_file->approximate_size > 0)
|
||||||
{
|
{
|
||||||
g_key_file_clear (key_file);
|
g_key_file_clear (key_file);
|
||||||
|
Reference in New Issue
Block a user