From e86a96c73ff01aa2f46feb2e0656555e6043f900 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 7 Sep 2013 16:47:18 -0400 Subject: [PATCH] Fixes the Selector returning empty file/directory names This fixes commit ba5ef5126921a16a3735620ea3de234e68a52d27 --- src/selector.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/selector.cpp b/src/selector.cpp index a454f12..8f58ce9 100644 --- a/src/selector.cpp +++ b/src/selector.cpp @@ -185,14 +185,10 @@ int Selector::exec(int startSelection) { if (fl.isFile(selected)) { file = fl[selected]; close = true; - - char *buf = realpath(file.c_str(), NULL); - file = buf; - free(buf); } else { - dir = dir+fl[selected]+"/"; + dir = dir+fl[selected]; char *buf = realpath(dir.c_str(), NULL); - dir = buf; + dir = (string) buf + '/'; free(buf); selected = 0;