Re: g_file_test()



"Dan Maas" <dmaas dcine com> writes:

> > > gboolean g_file_test    (const gchar  *filename,
> > >                          GFileTest     test);
> 
> > are there actually any objections/concerns not yet raised
> > on this issue? if not, i'd like to fix matters ASAP.
> 
> Aside from the obvious race conditions that users of this API are going to
> introduce? =)

I discussed this issue with Havoc when he first made up the patch for
addition to glib and a search for the g_file_test indentifier in
http://cvs.gnome.org/lxr/ seemeed to indicate that many uses of
g_file_test() are legitimate ... e.g., for indication of status,
rather than a substitute for proper error checking, use of O_EXCL,
etc.

Some indication of potential dangers in the docs wouldn't hurt,
of course.

(And the same search indicates that people do frequently do
things like G_FILE_TEST_IS_SYMLINK|G_FILE_TEST_IS_REGULAR, so
changing the semantic to be all-of while retaining the name
is definitely out.)

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]