From 20725fcdda3ad9a36e2b7604a890c797cff3de05 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 17 Aug 2014 10:15:15 +0200 Subject: [PATCH] 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. --- src/filelister.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filelister.cpp b/src/filelister.cpp index 4a1eed3..54af556 100644 --- a/src/filelister.cpp +++ b/src/filelister.cpp @@ -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; } }