From 8959a5b57dd75a0a0402fedd7a3705146631d419 Mon Sep 17 00:00:00 2001 From: Vlad Glagolev Date: Sat, 7 Oct 2017 23:47:32 -0400 Subject: [PATCH] Correct name checking for NEW and RENAME (#53) --- nnn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nnn.c b/nnn.c index 1b46491d..450474df 100644 --- a/nnn.c +++ b/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; }