From: Mike Blumenkrantz Date: Wed, 5 Sep 2012 09:44:23 +0000 (+0000) Subject: simplify Open Terminal Here callback X-Git-Tag: submit/efl/20131021.015651~3663 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca23ccf99071b0424efce358d198dbc7a4310cac;p=platform%2Fupstream%2Fenlightenment.git simplify Open Terminal Here callback SVN revision: 76183 --- diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c index ff695f0..0ebc4ac 100644 --- a/src/modules/fileman/e_fwin.c +++ b/src/modules/fileman/e_fwin.c @@ -1878,27 +1878,21 @@ _e_fwin_terminal(void *data, { E_Fwin *fwin = data; Efreet_Desktop *tdesktop; + char buf[PATH_MAX]; + const char *path; if (!fwin->cur_page) return; + if (!getcwd(buf, sizeof(buf))) return; tdesktop = e_util_terminal_desktop_get(); - if (tdesktop) + if (!tdesktop) return; + path = e_fm2_real_path_get(fwin->cur_page->fm_obj); + if (path) { - char buf[PATH_MAX]; - - if (getcwd(buf, sizeof(buf))) - { - const char *path; - - path = e_fm2_real_path_get(fwin->cur_page->fm_obj); - if (path) - { - chdir(path); - e_exec(fwin->zone, tdesktop, NULL, NULL, "fileman"); - chdir(buf); - } - } - efreet_desktop_free(tdesktop); + chdir(path); + e_exec(fwin->zone, tdesktop, NULL, NULL, "fileman"); + chdir(buf); } + efreet_desktop_free(tdesktop); } static void