From 8d32ad61d6c4cfdba4f617229b07575fb753002e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 4 Apr 2014 14:32:01 -0400 Subject: [PATCH] simplify/improve evry files dead code and maybe fix or add a bug CID 1039879 --- src/modules/everything/evry_plug_files.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/modules/everything/evry_plug_files.c b/src/modules/everything/evry_plug_files.c index 310320285..383bc2290 100644 --- a/src/modules/everything/evry_plug_files.c +++ b/src/modules/everything/evry_plug_files.c @@ -651,25 +651,13 @@ _fetch(Evry_Plugin *plugin, const char *input) IF_RELEASE(p->input); - if (!p->parent && input && !strncmp(input, "/", 1)) + if (!p->parent && input && (input[0] == '/')) { - char *path = NULL; - if (p->command != CMD_SHOW_ROOT) { _free_files(p); - IF_RELEASE(p->directory); - - if (path) - { - p->directory = eina_stringshare_add(path); - free(path); - } - else - { - p->directory = eina_stringshare_add("/"); - } + eina_stringshare_replace(&p->directory, input); _read_directory(p);