diff --git a/src/browser.c b/src/browser.c index 940f08e..4e22f86 100644 --- a/src/browser.c +++ b/src/browser.c @@ -55,14 +55,7 @@ char *do_browser(char *path) /* The number of the selected file before the current selected file. */ functionptrtype func; /* The function of the key the user typed in. */ - DIR *dir = opendir(path); - - /* If we can't open the given directory, forget it. */ - if (dir == NULL) { - beep(); - free(path); - return NULL; - } + DIR *dir; /* Don't show a cursor in the file list. */ curs_set(0); @@ -74,7 +67,7 @@ char *do_browser(char *path) path = mallocstrassn(path, get_full_path(newpath ? newpath : path)); - if (path != NULL && newpath != NULL) + if (path != NULL) dir = opendir(path); if (path == NULL || dir == NULL) {