mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Fix #243
This commit is contained in:
parent
6013d024ef
commit
bb002eeda0
12
src/nnn.c
12
src/nnn.c
|
@ -4024,10 +4024,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Confirm we are in a terminal */
|
/* Confirm we are in a terminal */
|
||||||
if (!cfg.picker && !(isatty(0) && isatty(1))) {
|
if (!cfg.picker && !(isatty(0) && isatty(1)))
|
||||||
xerror();
|
exit(1);
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the context colors; copier used as tmp var */
|
/* Get the context colors; copier used as tmp var */
|
||||||
copier = xgetenv(env_cfg[NNN_CONTEXT_COLORS], "4444");
|
copier = xgetenv(env_cfg[NNN_CONTEXT_COLORS], "4444");
|
||||||
|
@ -4069,7 +4067,11 @@ int main(int argc, char *argv[])
|
||||||
if (!ipath)
|
if (!ipath)
|
||||||
ipath = "/";
|
ipath = "/";
|
||||||
} else {
|
} else {
|
||||||
ipath = realpath(argv[optind], cwd);
|
ipath = argv[optind];
|
||||||
|
if (strlen(ipath) > 7 && ipath[0] == 'f' && ipath[1] == 'i' && ipath[2] == 'l'
|
||||||
|
&& ipath[3] == 'e' && ipath[4] == ':' && ipath[5] == '/' && ipath[6] == '/')
|
||||||
|
ipath = ipath + 7;
|
||||||
|
ipath = realpath(ipath, cwd);
|
||||||
if (!ipath) {
|
if (!ipath) {
|
||||||
xerror();
|
xerror();
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue