noice

small file browser
git clone git://git.2f30.org/noice
Log | Files | Refs | README | LICENSE

commit 3bc66a43a7d1610776ff25af3675f9527fc4aabc
parent 65a01f96363e7c6e1a7d479f18cacde8e32eb2a0
Author: sin <sin@2f30.org>
Date:   Tue, 21 Oct 2014 12:03:53 +0100

Show hidden files if run as root

Diffstat:
Mnoice.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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];