diff --git a/src/selector.cpp b/src/selector.cpp index f0efea7..a454f12 100644 --- a/src/selector.cpp +++ b/src/selector.cpp @@ -185,8 +185,16 @@ 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]+"/"; + char *buf = realpath(dir.c_str(), NULL); + dir = buf; + free(buf); + selected = 0; firstElement = 0; prepare(&fl,&screens,&titles);