From 18b1eb71110bbeb5660b0ac11bc447406a4eda98 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 15 Dec 2012 07:44:11 +0000 Subject: [PATCH] revert that.. its not a double free... its a bizarre-arse macro! SVN revision: 81012 --- src/bin/e_fm_op.c | 30 +++++++++++++++++++++--------- src/bin/e_init_main.c | 4 ++++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/bin/e_fm_op.c b/src/bin/e_fm_op.c index 94bea182e..dc2a739b3 100644 --- a/src/bin/e_fm_op.c +++ b/src/bin/e_fm_op.c @@ -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; diff --git a/src/bin/e_init_main.c b/src/bin/e_init_main.c index f6f2a391d..892de4599 100644 --- a/src/bin/e_init_main.c +++ b/src/bin/e_init_main.c @@ -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);