mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Show hidden files if run as root
This commit is contained in:
parent
65a01f9636
commit
3bc66a43a7
7
noice.c
7
noice.c
|
@ -606,7 +606,12 @@ int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char cwd[PATH_MAX], *ipath;
|
char cwd[PATH_MAX], *ipath;
|
||||||
char *ifilter = "^[^.].*"; /* Hide dotfiles */
|
char *ifilter;
|
||||||
|
|
||||||
|
if (getuid() == 0)
|
||||||
|
ifilter = ".*";
|
||||||
|
else
|
||||||
|
ifilter = "^[^.].*"; /* Hide dotfiles */
|
||||||
|
|
||||||
if (argv[1] != NULL) {
|
if (argv[1] != NULL) {
|
||||||
ipath = argv[1];
|
ipath = argv[1];
|
||||||
|
|
Loading…
Reference in a new issue