GNOME Bugzilla – Bug 169349
g_get_system_data_dirs(), g_get_system_config_dirs() return NULL on win98 (and NT4?)
Last modified: 2005-05-18 02:27:22 UTC
Distribution/Version: 98 g_get_system_data_dirs() uses the special folders specified by CSIDL_COMMON_APPDATA and CSIDL_COMMON_DOCUMENTS and g_get_system_config_dirs() uses CSIDL_COMMON_APPDATA. The above CSIDLs are not available prior to WindowsME/2000 (unless you are using the ShFolder redistributable (in which which case you also need to link to SHFolder.lib)) g_get_system_data_dirs() is used in gkeyfile.c and gtkicontheme.c; both cases don't expect a NULL value to be returned and will consequently blow up. This effectively makes most gtk apps (anything that uses a window with decorations) unusable on Windows98. I think it makes sense we should be able to assume that thse functions won't return NULL, so I think that they should fall back to CSIDL_APPDATA. I'll post a patch in a minute.
Created attachment 38325 [details] [review] Add fallback to CSIDL_APPDATA. This patch assumes that the patch attached to Bug #169348 has been applied.
This causes the crash in Bug# 168608.
I think it's better to have g_get_system_data_dirs() and g_get_system_config_dirs() return an array with just a single NULL element if they can't figure out what to return. The committed fix for #169348 does that, so it should solve this bug, too.
*** Bug 168608 has been marked as a duplicate of this bug. ***
*** Bug 171764 has been marked as a duplicate of this bug. ***
*** Bug 172273 has been marked as a duplicate of this bug. ***
*** Bug 172698 has been marked as a duplicate of this bug. ***
*** Bug 302241 has been marked as a duplicate of this bug. ***
*** Bug 172064 has been marked as a duplicate of this bug. ***