nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 296ee153b0aeb7078f404470301792d795287b5e
parent 8f975a11f06949f0154ad9735368d54fcb67d7d5
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Fri, 30 Jun 2006 14:28:32 +0000

simplify


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/browser.c | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -330,12 +330,9 @@ char *do_browser(char *path, DIR *dir) /* If we've successfully opened a directory, and it's * "..", save the current directory in prev_dir, so that * we can select it later. */ - } else if (strcmp(tail(filelist[selected]), - "..") == 0) { - prev_dir = mallocstrcpy(NULL, filelist[selected]); - prev_dir = mallocstrassn(prev_dir, - striponedir(prev_dir)); - } + } else if (strcmp(tail(filelist[selected]), "..") == 0) + prev_dir = mallocstrcpy(NULL, + striponedir(filelist[selected])); dir = opendir(filelist[selected]); if (dir == NULL) {