mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 17:58:27 +02:00
Do not list ".." as a subdirectory of the root directory
In Linux "/.." exists and loops back onto the root. But for the user it is confusing to see a ".." entry listed that does nothing when selected, so hide it.
This commit is contained in:
parent
0b0e278459
commit
20725fcdda
@ -88,7 +88,7 @@ bool FileLister::browse(const string& path, bool clean)
|
||||
while (struct dirent *dptr = readdir(dirp)) {
|
||||
// Ignore hidden files and optionally "..".
|
||||
if (dptr->d_name[0] == '.') {
|
||||
if (!(dptr->d_name[1] == '.' && showUpdir)) {
|
||||
if (!(dptr->d_name[1] == '.' && showUpdir && slashedPath != "/")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user