revert that.. its not a double free... its a bizarre-arse macro!

SVN revision: 81012
This commit is contained in:
Carsten Haitzler 2012-12-15 07:44:11 +00:00
parent 320ec625b0
commit 18b1eb7111
2 changed files with 25 additions and 9 deletions

View File

@ -1238,30 +1238,42 @@ _e_fm_op_copy_link(E_Fm_Op_Task *task)
lnk_path = ecore_file_readlink(task->src.name);
if (!lnk_path)
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR,
"Cannot read link '%s'.", task->src.name);
{
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot read link '%s'.", task->src.name);
}
E_FM_OP_DEBUG("Creating link from '%s' to '%s'\n", lnk_path, task->dst.name);
_e_fm_op_update_progress_report_simple(0, lnk_path, task->dst.name);
if (symlink(lnk_path, task->dst.name) == -1)
{
char *buf;
if (errno == EEXIST)
{
if (unlink(task->dst.name) == -1)
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR,
"Cannot unlink '%s': %s.", task->dst.name);
else if (symlink(lnk_path, task->dst.name) == -1)
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR,
"Cannot create link from '%s' to '%s': %s.", lnk_path, task->dst.name);
{
free(lnk_path);
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot unlink '%s': %s.", task->dst.name);
}
if (symlink(lnk_path, task->dst.name) == -1)
{
buf = strdupa(lnk_path);
free(lnk_path);
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
}
}
else
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR,
"Cannot create link from '%s' to '%s': %s.", lnk_path, task->dst.name);
{
buf = strdupa(lnk_path);
free(lnk_path);
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
}
}
free(lnk_path);
task->dst.done += task->src.st.st_size;
_e_fm_op_update_progress(task, task->src.st.st_size, 0);
task->finished = 1;

View File

@ -281,6 +281,7 @@ e_init_init(void)
{
ecore_x_window_size_get(roots[i], &w, &h);
_e_init_ecore_evas = _e_init_evas_new(roots[i], w, h, &_e_init_win);
fprintf(stderr, "init win: %ix%i for %x\n", w, h, roots[i]);
_e_init_evas = ecore_evas_get(_e_init_ecore_evas);
initwins[(i * 2) + 0] = roots[i];
initwins[(i * 2) + 1] = _e_init_win;
@ -295,6 +296,7 @@ e_init_init(void)
/* primary screen/root */
ecore_x_window_size_get(root, &w, &h);
_e_init_ecore_evas = _e_init_evas_new(root, w, h, &_e_init_win);
fprintf(stderr, "main init win: %ix%i for %x\n", w, h, root);
_e_init_evas = ecore_evas_get(_e_init_ecore_evas);
initwins[0] = root;
initwins[1] = _e_init_win;
@ -315,6 +317,7 @@ e_init_init(void)
}
else
edje_object_file_set(o, s, "e/init/extra_screen");
fprintf(stderr, "screen region screen %p: %ix%i for %x\n", scr, scr->x, scr->y, scr->w, scr->h);
evas_object_move(o, scr->x, scr->y);
evas_object_resize(o, scr->w, scr->h);
evas_object_show(o);
@ -325,6 +328,7 @@ e_init_init(void)
o = edje_object_add(_e_init_evas);
edje_object_file_set(o, s, "e/init/splash");
_e_init_object = o;
fprintf(stderr, "screen region fill\n", w, h);
evas_object_move(o, 0, 0);
evas_object_resize(o, w, h);
evas_object_show(o);