noice

small file browser
git clone git://git.2f30.org/noice
Log | Files | Refs | README | LICENSE

commit 414ea845bbd4eac43dada7dc97f45556e1f8a060
parent 43aebe099812bcce3e0b223d1ec8f50141351b3f
Author: sin <sin@2f30.org>
Date:   Wed, 10 Feb 2016 15:09:04 +0000

Use dents name directly like we do in other places

Diffstat:
Mnoice.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 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; }