diff --git a/src/browser.c b/src/browser.c index 7fda929..df70231 100644 --- a/src/browser.c +++ b/src/browser.c @@ -331,6 +331,14 @@ char *do_browser(char *path) continue; } + if (chdir(filelist[selected]) == -1) { + statusline(ALERT, _("Error reading %s: %s"), + filelist[selected], strerror(errno)); + continue; + } else { + IGNORE_CALL_RESULT(chdir(present_path)); + } + /* If we moved up one level, remember where we came from, so * this directory can be highlighted and easily reentered. */ if (strcmp(tail(filelist[selected]), "..") == 0)