On Mandag 31. desember 2007, Matthias Clasen wrote: > On Dec 31, 2007 12:52 PM, Asbjørn <[EMAIL PROTECTED]> wrote: > > . > > > > what I meant to say is that GLib only guarantees the desktop directory > > > to be non-NULL, the others may well be NULL. > > > > Ok. > > The first fail will at G_USER_DIRECTORY_DOCUMENTS. > > > > Then the code could be like this: > > ..... > > if (file_exists("HOME/.config/user-dirs.dirs")) > > { > > udddocs = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); > > g_assert (udddocs != NULL); > > uddpubshare = g_get_user_special_dir > > (G_USER_DIRECTORY_PUBLIC_SHARE); g_assert (uddpubshare != NULL); > > } > > No. Even if user-dirs.dirs exists, some of the directories could still > be NULL... You said No but “Even if user-dirs.dirs exists, some of the directories could still be NULL” is what my code example do.
My simple goal is to build glib and run “make test” without any errors. This “user-dirs.dirs” requirement must be for Gnome,distro and not for glib itself ? If so then it's not a glib “ERROR”. The testglib should check for “user-dirs.dirs” and skip those tests for non gnome systems. I'm checking out the Test framework because i have my own framework and i was curious about glib's. I first checked out from my OpenSUSE 10.3 system, but there it crashed ! See bug 506146 for info and fix. After fixing the bug in glib/glib/tests/testing.c i ran into the “user-dirs.dirs” problem. Then i checked from my Mandriva 2007. No crash, but still directory problem. _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list