From: David Lawrence Ramsey Date: Tue, 7 Feb 2006 20:10:28 +0000 (+0000) Subject: fix file browser breakage X-Git-Tag: v1.3.11~50 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ef9dc83a4bd504ea5ef75dd83b1bd84a5f6486b0;p=nano.git fix file browser breakage git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3279 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/browser.c b/src/browser.c index 6ad38771..9b6583e3 100644 --- a/src/browser.c +++ b/src/browser.c @@ -34,7 +34,7 @@ * Assume path has already been tilde-expanded. */ char *do_browser(char *path, DIR *dir) { - int kbinput = ERR, longest, selected = 0, width = 0; + int kbinput, longest, selected, width; bool meta_key = FALSE, func_key = FALSE; bool old_const_update = ISSET(CONST_UPDATE); size_t numents; @@ -54,6 +54,10 @@ char *do_browser(char *path, DIR *dir) change_browser_directory: /* We go here after the user selects a new directory. */ + kbinput = ERR; + selected = 0; + width = 0; + path = mallocstrassn(path, get_full_path(path)); /* Assume that path exists and ends with a slash. */