mirror of
https://github.com/jarun/nnn.git
synced 2025-02-17 14:54:36 +00:00
Correct name checking for NEW and RENAME (#53)
This commit is contained in:
parent
0d88940ba5
commit
8959a5b57d
4
nnn.c
4
nnn.c
|
@ -2677,7 +2677,7 @@ nochange:
|
|||
break;
|
||||
|
||||
/* Allow only relative, same dir paths */
|
||||
if (tmp[0] == '/' || basename(tmp) != tmp) {
|
||||
if (tmp[0] == '/' || xstrcmp(basename(tmp), tmp) != 0) {
|
||||
printmsg(STR_INPUT);
|
||||
goto nochange;
|
||||
}
|
||||
|
@ -2730,7 +2730,7 @@ nochange:
|
|||
break;
|
||||
|
||||
/* Allow only relative, same dir paths */
|
||||
if (tmp[0] == '/' || basename(tmp) != tmp) {
|
||||
if (tmp[0] == '/' || xstrcmp(basename(tmp), tmp) != 0) {
|
||||
printmsg(STR_INPUT);
|
||||
goto nochange;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue