]> Sergey Matveev's repositories - nnn.git/commitdiff
Use dents name directly like we do in other places
authorsin <sin@2f30.org>
Wed, 10 Feb 2016 15:09:04 +0000 (15:09 +0000)
committersin <sin@2f30.org>
Wed, 10 Feb 2016 15:09:04 +0000 (15:09 +0000)
noice.c

diff --git a/noice.c b/noice.c
index a95d8fff557a21fd75f65393b6dd35a68872230f..4431773935c50edb864adc8c3a56f88f3ae27da1 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -570,7 +570,7 @@ void
 browse(char *ipath, char *ifilter)
 {
        char newpath[PATH_MAX];
-       char *name, *bin, *dir, *tmp, *run, *env;
+       char *bin, *dir, *tmp, *run, *env;
        struct stat sb;
        regex_t re;
        int r, fd;
@@ -613,8 +613,7 @@ nochange:
                        if (n == 0)
                                goto nochange;
 
-                       name = dents[cur].name;
-                       mkpath(path, name, newpath, sizeof(newpath));
+                       mkpath(path, dents[cur].name, newpath, sizeof(newpath));
                        DPRINTF_S(newpath);
 
                        /* Get path info */
@@ -730,10 +729,9 @@ nochange:
                        initcurses();
                        break;
                case SEL_RUNARG:
-                       name = dents[cur].name;
                        run = xgetenv(env, run);
                        exitcurses();
-                       spawn(run, name, path);
+                       spawn(run, dents[cur].name, path);
                        initcurses();
                        break;
                }