Re: g_concat_dir_and_file does bad thing with "" for dir

On Thu, Jul 06, 2000 at 08:31:59AM -0700, Darin Adler wrote:
>>> if (dir [strlen(dir) - 1] != PATH_SEP)
>> The above code won't work right if the dir is "".
>> We can either add:
>> g_return_val_if_fail (dir [0] != '\0', NULL);
>> Or change the if to:
>> if (dir [0] != '\0' && dir [strlen(dir) - 1] != PATH_SEP)

on 7/6/00 3:20 PM, George at wrote:
> I'm for the second part.  I think "" should not be an error.  Perhaps even
> NULL should not be an error, as it just might mean there is no directory to
> prepend.
> Miguel has the final say, but I'd say this is a good change.  There was some
> talk about putting the g_* functions from gnome-libs into glib, so it might
> be relevant in that respect as well.

This exchange is about a month and a half old.

Miguel has the final say, so I'll give him another month to reply. If he
doesn't respond by 9/24, I'll check the change that George prefers into

    -- Darin

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