Don't show .. in the root directory
This commit is contained in:
parent
4a2a49312b
commit
315b662581
3
sdn.cpp
3
sdn.cpp
|
@ -765,7 +765,8 @@ fun reload () {
|
||||||
while (auto f = readdir (dir)) {
|
while (auto f = readdir (dir)) {
|
||||||
string name = f->d_name;
|
string name = f->d_name;
|
||||||
// Two dots are for navigation but this ain't as useful
|
// Two dots are for navigation but this ain't as useful
|
||||||
if (name != "." && (name == ".." || name[0] != '.' || g.show_hidden))
|
if (name != "." && (name != ".." || g.cwd != "/")
|
||||||
|
&& (name[0] != '.' || g.show_hidden))
|
||||||
g.entries.push_back (make_entry (f));
|
g.entries.push_back (make_entry (f));
|
||||||
}
|
}
|
||||||
closedir (dir);
|
closedir (dir);
|
||||||
|
|
Loading…
Reference in New Issue