1
1
mirror of https://github.com/jarun/nnn.git synced 2024-09-22 02:18:04 +03:00

Confirm we are in a terminal

This commit is contained in:
lostd 2015-03-12 14:57:34 +02:00
parent 97cfd82eed
commit bc11d7b201

View File

@ -835,6 +835,10 @@ main(int argc, char *argv[])
char cwd[PATH_MAX], *ipath;
char *ifilter;
/* Confirm we are in a terminal */
if (!isatty(STDIN_FILENO))
printerr(1, "isatty");
if (getuid() == 0)
ifilter = ".";
else