1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-04 22:24:32 +03:00

Make the Selector return the canonicalised absolute pathname

This commit is contained in:
Paul Cercueil 2013-09-05 19:23:27 -04:00
parent b73391486f
commit ba5ef51269

View File

@ -185,8 +185,16 @@ int Selector::exec(int startSelection) {
if (fl.isFile(selected)) { if (fl.isFile(selected)) {
file = fl[selected]; file = fl[selected];
close = true; close = true;
char *buf = realpath(file.c_str(), NULL);
file = buf;
free(buf);
} else { } else {
dir = dir+fl[selected]+"/"; dir = dir+fl[selected]+"/";
char *buf = realpath(dir.c_str(), NULL);
dir = buf;
free(buf);
selected = 0; selected = 0;
firstElement = 0; firstElement = 0;
prepare(&fl,&screens,&titles); prepare(&fl,&screens,&titles);