]> Sergey Matveev's repositories - nnn.git/commitdiff
Correct name checking for NEW and RENAME (#53)
authorVlad Glagolev <vaygr@users.noreply.github.com>
Sun, 8 Oct 2017 03:47:32 +0000 (23:47 -0400)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 8 Oct 2017 03:47:32 +0000 (09:17 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 1b46491de44a413518037ef4e578babfd9356feb..450474dff2715f9c09b6f9b3e26766d47ff83734 100644 (file)
--- 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;
                        }