projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0c7557
)
GKeyFile: Accept empty files
author
Jürg Billeter
<j@bitron.ch>
Fri, 4 Nov 2011 21:48:56 +0000
(22:48 +0100)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 18 Nov 2011 04:11:41 +0000
(23:11 -0500)
It already accepts files consisting solely of whitespace.
https://bugzilla.gnome.org/show_bug.cgi?id=663432
glib/gkeyfile.c
patch
|
blob
|
history
diff --git
a/glib/gkeyfile.c
b/glib/gkeyfile.c
index
20de0d8
..
dc4faf3
100644
(file)
--- 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);