Show hidden files if run as root

This commit is contained in:
sin 2014-10-21 12:03:53 +01:00
parent 65a01f9636
commit 3bc66a43a7

View file

@ -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];