diff options
| author | 2014-10-21 12:03:53 +0100 | |
|---|---|---|
| committer | 2014-10-21 12:03:53 +0100 | |
| commit | 3bc66a43a7d1610776ff25af3675f9527fc4aabc (patch) | |
| tree | 7bccd7d945e502696407236ce283a1d50b82d356 | |
| parent | 65a01f96363e7c6e1a7d479f18cacde8e32eb2a0 (diff) | |
| download | nnn-3bc66a43a7d1610776ff25af3675f9527fc4aabc.tar.gz | |
Show hidden files if run as root
| -rw-r--r-- | noice.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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]; |