* (GROUP parts or BOX/TABLE items pointing to non-existent/renamed
* groups).
*/
+ Efl_Vpath_File *file_obj =
+ efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file);
+ efl_vpath_file_do(file_obj);
+ // XXX:FIXME: allow this to be async
+ efl_vpath_file_wait(file_obj);
+ file = efl_vpath_file_result_get(file_obj);
+
Eina_Bool int_ret = EINA_FALSE;
int_ret = efl_file_set(eo_super(obj, MY_CLASS), file, group);
if (!int_ret)
- return ret;
+ {
+ eo_del(file_obj);
+ return ret;
+ }
eed->program_scripts = eina_hash_int32_new((Eina_Free_Cb)_edje_edit_program_script_free);
ef = eet_open(file, EET_FILE_MODE_READ);
+ eo_del(file_obj);
snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i",
eed->base->collection->id);
Eina_List *lst;
if ((!file) || (!*file)) return NULL;
+ Efl_Vpath_File *file_obj =
+ efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file);
+ efl_vpath_file_do(file_obj);
+ // XXX:FIXME: allow this to be async
+ efl_vpath_file_wait(file_obj);
+ file = efl_vpath_file_result_get(file_obj);
f = eina_file_open(file, EINA_FALSE);
lst = edje_mmap_collection_list(f);
eina_file_close(f);
+ eo_del(file_obj);
return lst;
}
ed->file = NULL;
}
}
- else
- {
- // FIXME: it will be actually better to remove ed->path.
- ed->path = eina_stringshare_add(eina_file_filename_get(f));
- }
}
static int
double duration_scale;
+ Efl_Vpath_File *file_obj;
+
Eina_List *user_defined;
lua_State *L;
EOLIAN static void
_edje_object_eo_base_destructor(Eo *obj, Edje *class_data)
{
+ if (class_data->file_obj)
+ {
+ eo_del(class_data->file_obj);
+ class_data->file_obj = NULL;
+ }
eo_destructor(eo_super(obj, MY_CLASS));
eo_data_unref(obj, class_data->base);
}
ret = EINA_FALSE;
+ if (ed->file_obj)
+ {
+ eo_del(ed->file_obj);
+ ed->file_obj = NULL;
+ }
if (file)
{
- f = eina_file_open(file, EINA_FALSE);
+ const char *file2;
+
+ ed->file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file);
+ efl_vpath_file_do(ed->file_obj);
+ // XXX:FIXME: allow this to be async
+ efl_vpath_file_wait(ed->file_obj);
+ file2 = efl_vpath_file_result_get(ed->file_obj);
+
+ f = eina_file_open(file2, EINA_FALSE);
if (!f)
{
+ eo_del(ed->file_obj);
+ ed->file_obj = NULL;
+ if (ed->path) eina_stringshare_del(ed->path);
+ ed->path = NULL;
ed->load_error = EDJE_LOAD_ERROR_DOES_NOT_EXIST;
return ret;
}
nested = eina_array_new(8);
if (_edje_object_file_set_internal(obj, f, group, NULL, NULL, nested))
- ret = EINA_TRUE;
+ {
+ if (file)
+ {
+ ed->path = eina_stringshare_add(file);
+ }
+ else
+ {
+ if (ed->path) eina_stringshare_del(ed->path);
+ ed->path = NULL;
+ }
+ ret = EINA_TRUE;
+ }
+ else
+ {
+ if (ed->path) eina_stringshare_del(ed->path);
+ ed->path = NULL;
+ }
eina_array_free(nested);
eina_file_close(f);