From ab9d41a1a9e9273e33d7c92e3cfa91add341f982 Mon Sep 17 00:00:00 2001 From: sebastid Date: Mon, 10 Oct 2005 20:49:26 +0000 Subject: [PATCH] Use _e_fm_file_fullname, and make _e_fm_file_fullname return the correct fullname when in root dir. SVN revision: 17408 --- src/bin/e_fileman_smart.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bin/e_fileman_smart.c b/src/bin/e_fileman_smart.c index a4744092f..a22060d99 100644 --- a/src/bin/e_fileman_smart.c +++ b/src/bin/e_fileman_smart.c @@ -2098,12 +2098,7 @@ _e_fm_file_icon_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event } else { - char path[PATH_MAX]; - if (!strcmp(file->sd->dir, "/")) - snprintf(path, sizeof(path), "/%s", file->dir_entry->d_name); - else - snprintf(path, sizeof(path), "%s/%s", file->sd->dir, file->dir_entry->d_name); - fullname = strdup(path); + fullname = _e_fm_file_fullname(file); } /* FIXME: we need to fix this, uber hack alert */ @@ -2646,7 +2641,10 @@ _e_fm_file_fullname(E_Fileman_File *file) { char fullname[PATH_MAX]; - snprintf(fullname, sizeof(fullname), "%s/%s", file->sd->dir, file->dir_entry->d_name); + if (!strcmp(file->sd->dir, "/")) + snprintf(fullname, sizeof(fullname), "/%s", file->dir_entry->d_name); + else + snprintf(fullname, sizeof(fullname), "%s/%s", file->sd->dir, file->dir_entry->d_name); return strdup(fullname); }