From 542d3021088ab5873650f57f66277a00d52fdb59 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 2 Aug 2012 12:25:58 +0000 Subject: [PATCH] e_fm2_parent_go() and e_fm2_has_parent_get() now behave as expected ticket #1243 SVN revision: 74805 --- src/bin/e_fm.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index c3bacf67e..fc7c2d520 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -1331,7 +1331,7 @@ e_fm2_has_parent_get(Evas_Object *obj) { EFM_SMART_CHECK(0); if (!sd->path) return 0; - if ((sd->path[0] == 0) || (!strcmp(sd->path, "/"))) return 0; + if ((sd->realpath[0] == 0) || (!strcmp(sd->realpath, "/"))) return 0; return 1; } @@ -1348,15 +1348,20 @@ e_fm2_parent_go(Evas_Object *obj) char *p, *path; EFM_SMART_CHECK(); if (!sd->path) return; - path = strdup(sd->path); + path = strdupa(sd->path); if (!path) return; if ((p = strrchr(path, '/'))) *p = 0; - if (*path == 0) - e_fm2_path_set(obj, sd->dev, "/"); - else + if (*path) e_fm2_path_set(obj, sd->dev, path); - - free(path); + else + { + path = strdupa(sd->realpath); + p = strrchr(path, '/'); + if (!p) return; + *p = 0; + e_fm2_path_set(obj, "/", path); + } + } EAPI void