--- trunk/src/gconf.c 2009/08/07 07:57:33 48 +++ trunk/src/gconf.c 2009/08/18 20:33:08 62 @@ -330,6 +330,22 @@ #endif appdata->image_path = strdup(DEFAULT_IMAGE_PATH); + /* check if this path is actually accessible */ + /* and change it to the current users home if not */ + /* (this should only happen on scratchbox) */ + if(!g_file_test(appdata->image_path, G_FILE_TEST_IS_DIR)) { + if(g_mkdir_with_parents(appdata->image_path, 0700) != 0) { + char *p = getenv("HOME"); + if(!p) p = "/tmp/"; + + appdata->image_path = + g_strdup_printf("%s%s%s", p, + (p[strlen(p)-1]!='/')?"/":"", + DEFAULT_IMAGE_PATH_HOME); + printf("using alt path %s\n", appdata->image_path); + } + } + } else { /* some versions old versions messed up the path */ if(appdata->image_path[strlen(appdata->image_path)-1] != '/') {