fix breakage

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3705 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2006-06-30 14:21:29 +00:00
parent a4e92c8ad6
commit 2458b295d9
1 changed files with 4 additions and 2 deletions

View File

@ -333,7 +333,8 @@ char *do_browser(char *path, DIR *dir)
} else if (strcmp(tail(filelist[selected]), } else if (strcmp(tail(filelist[selected]),
"..") == 0) { "..") == 0) {
prev_dir = mallocstrcpy(NULL, filelist[selected]); prev_dir = mallocstrcpy(NULL, filelist[selected]);
prev_dir = striponedir(prev_dir); prev_dir = mallocstrassn(prev_dir,
striponedir(prev_dir));
} }
dir = opendir(filelist[selected]); dir = opendir(filelist[selected]);
@ -401,7 +402,8 @@ char *do_browse_from(const char *inpath)
* at all. If so, we'll just pass the current directory to * at all. If so, we'll just pass the current directory to
* do_browser(). */ * do_browser(). */
if (stat(path, &st) == -1 || !S_ISDIR(st.st_mode)) { if (stat(path, &st) == -1 || !S_ISDIR(st.st_mode)) {
path = striponedir(path); path = mallocstrassn(path, striponedir(path));
if (stat(path, &st) == -1 || !S_ISDIR(st.st_mode)) { if (stat(path, &st) == -1 || !S_ISDIR(st.st_mode)) {
free(path); free(path);