void *event_info __UNUSED__)
{
Evas_Object *win, *fs, *bg, *vbox, *hbox, *bt, *sep;
+ const char *path = NULL;
/* Set the locale according to the system pref.
* If you dont do so the file selector will order the files list in
/* make the file list a tree with dir expandable in place */
elm_fileselector_expandable_set(fs, EINA_FALSE);
/* start the fileselector in the home dir */
- elm_fileselector_path_set(fs, getenv("HOME"));
+ path = getenv("HOME");
+ if (!path) path = "./";
+ elm_fileselector_path_set(fs, path);
/* allow fs to expand in x & y */
evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL);
void *event_info __UNUSED__)
{
Evas_Object *fs = data;
- _populate(fs, getenv("HOME"), NULL);
+ const char *path = getenv("HOME");
+ if (!path) path = "./";
+ _populate(fs, path, NULL);
+
}
static void
{
const char *name;
char buf[PATH_MAX];
+ char *dir;
+ dir = wd->only_folder ? ecore_file_dir_get(wd->path) : strdup(wd->path);
name = elm_entry_entry_get(wd->filename_entry);
snprintf(buf, sizeof(buf), "%s/%s",
- wd->only_folder ? ecore_file_dir_get(wd->path) : wd->path,
- name);
+ dir, name);
eina_stringshare_replace(&wd->selection, buf);
+ if (dir) free(dir);
return wd->selection;
}