Commit 2458b295 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

fix breakage

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3705 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Showing with 4 additions and 2 deletions
+4 -2
......@@ -333,7 +333,8 @@ char *do_browser(char *path, DIR *dir)
} else if (strcmp(tail(filelist[selected]),
"..") == 0) {
prev_dir = mallocstrcpy(NULL, filelist[selected]);
prev_dir = striponedir(prev_dir);
prev_dir = mallocstrassn(prev_dir,
striponedir(prev_dir));
}
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
* do_browser(). */
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)) {
free(path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment