GNOME Bugzilla – Bug 663432
GKeyFile rejects empty files
Last modified: 2012-01-04 05:38:47 UTC
Created attachment 200717 [details] [review] Proposed patch g_key_file_load_from_fd explicitly checks for empty files and returns a parse error in this case. However, it happily accepts other files without actual content, e.g., files consisting solely of whitespace. The attached patch simply drops this check. The desktop entry spec¹ doesn't say anything about rejecting empty files, however, that spec also requires a [Desktop Entry] group header, so it is too specific to be used as reference in this case. ¹ http://standards.freedesktop.org/desktop-entry-spec/latest/
Review of attachment 200717 [details] [review]: Seems reasonable, indeed.
The following fix has been pushed: fcffe6a GKeyFile: Accept empty files
Created attachment 201642 [details] [review] GKeyFile: Accept empty files It already accepts files consisting solely of whitespace.
*** Bug 656192 has been marked as a duplicate of this bug. ***