]> Sergey Matveev's repositories - nnn.git/commitdiff
Show hidden files if run as root
authorsin <sin@2f30.org>
Tue, 21 Oct 2014 11:03:53 +0000 (12:03 +0100)
committersin <sin@2f30.org>
Tue, 21 Oct 2014 11:03:53 +0000 (12:03 +0100)
noice.c

diff --git a/noice.c b/noice.c
index 3a9e241c4e596402392c1970b86fb93f6df37b95..5d8cc4756b4d9cd78b5d44a04bb54c75318b858f 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -606,7 +606,12 @@ int
 main(int argc, char *argv[])
 {
        char cwd[PATH_MAX], *ipath;
-       char *ifilter = "^[^.].*"; /* Hide dotfiles */
+       char *ifilter;
+
+       if (getuid() == 0)
+               ifilter = ".*";
+       else
+               ifilter = "^[^.].*"; /* Hide dotfiles */
 
        if (argv[1] != NULL) {
                ipath = argv[1];