gkeyfile: Fix FD validity test to be technically correct

The fd could be valid and zero.

https://bugzilla.gnome.org/show_bug.cgi?id=760324
This commit is contained in:
Stewart Brodie 2016-01-08 14:35:00 +00:00 committed by Philip Withnall
parent b6d1c128b3
commit fc857073a0

View File

@ -789,7 +789,7 @@ find_file_in_data_dirs (const gchar *file,
"found in search dirs"));
}
if (output_file != NULL && fd > 0)
if (output_file != NULL && fd != -1)
*output_file = g_strdup (path);
g_free (path);