diff --git a/src/browser.c b/src/browser.c
index 0fea7b7a34ec7248ade8d813e7e9884b9424c1f1..940f08e0633b85ee27214e59a42441cdcb5b1420 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -271,6 +271,10 @@ char *do_browser(char *path)
 		continue;
 	    }
 #endif
+	    /* Snip a trailing slash, so the name can be compared. */
+	    if (strlen(newpath) > 1 && newpath[strlen(newpath) - 1] == '/')
+		newpath[strlen(newpath) - 1] = '\0';
+
 	    /* In case the specified directory cannot be entered, select it
 	     * (if it is in the current list) so it will be highlighted. */
 	    for (i = 0; i < filelist_len; i++)