1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 22:28:25 +02:00

Fixes the Selector returning empty file/directory names

This fixes commit ba5ef51269
This commit is contained in:
Paul Cercueil 2013-09-07 16:47:18 -04:00
parent 3ce314c65d
commit e86a96c73f

View File

@ -185,14 +185,10 @@ 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); char *buf = realpath(dir.c_str(), NULL);
dir = buf; dir = (string) buf + '/';
free(buf); free(buf);
selected = 0; selected = 0;