1
0
Fork 0
mirror of https://github.com/jarun/nnn.git synced 2025-04-12 08:26:33 +00:00

Correct name checking for NEW and RENAME ()

This commit is contained in:
Vlad Glagolev 2017-10-07 23:47:32 -04:00 committed by Arun Prakash Jana
parent 0d88940ba5
commit 8959a5b57d

4
nnn.c
View file

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