Browse Source

Use dents name directly like we do in other places

master
sin 9 years ago
parent
commit
414ea845bb
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      noice.c

+ 3
- 5
noice.c View File

@@ -570,7 +570,7 @@ void
browse(char *ipath, char *ifilter) browse(char *ipath, char *ifilter)
{ {
char newpath[PATH_MAX]; char newpath[PATH_MAX];
char *name, *bin, *dir, *tmp, *run, *env;
char *bin, *dir, *tmp, *run, *env;
struct stat sb; struct stat sb;
regex_t re; regex_t re;
int r, fd; int r, fd;
@@ -613,8 +613,7 @@ nochange:
if (n == 0) if (n == 0)
goto nochange; goto nochange;


name = dents[cur].name;
mkpath(path, name, newpath, sizeof(newpath));
mkpath(path, dents[cur].name, newpath, sizeof(newpath));
DPRINTF_S(newpath); DPRINTF_S(newpath);


/* Get path info */ /* Get path info */
@@ -730,10 +729,9 @@ nochange:
initcurses(); initcurses();
break; break;
case SEL_RUNARG: case SEL_RUNARG:
name = dents[cur].name;
run = xgetenv(env, run); run = xgetenv(env, run);
exitcurses(); exitcurses();
spawn(run, name, path);
spawn(run, dents[cur].name, path);
initcurses(); initcurses();
break; break;
} }


Loading…
Cancel
Save