From 315b662581f771ff521b2f826dede8470c082ed6 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Mon, 3 Dec 2018 22:04:35 +0100 Subject: Don't show .. in the root directory --- sdn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdn.cpp b/sdn.cpp index 0a5f2ee..05e9cc2 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -765,7 +765,8 @@ fun reload () { while (auto f = readdir (dir)) { string name = f->d_name; // 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)); } closedir (dir); -- cgit v1.2.3-70-g09d2