EAPI void
elm_fileselector_path_set(Evas_Object *obj,
- const char *path)
+ const char *_path)
{
ELM_CHECK_WIDTYPE(obj, widtype);
+ char *path;
+ path = ecore_file_realpath(_path);
_populate(obj, path, NULL);
+ free(path);
}
EAPI const char *
EAPI Eina_Bool
elm_fileselector_selected_set(Evas_Object *obj,
- const char *path)
+ const char *_path)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
+ Eina_Bool ret = EINA_TRUE;
+ char *path;
+ path = ecore_file_realpath(_path);
+
if (ecore_file_is_dir(path))
_populate(obj, path, NULL);
else
{
if (!ecore_file_exists(path))
- return EINA_FALSE;
+ {
+ ret = EINA_FALSE;
+ goto clean_up;
+ }
_populate(obj, ecore_file_dir_get(path), NULL);
if (wd->filename_entry)
}
}
- return EINA_TRUE;
+clean_up:
+ free(path);
+ return ret;
}