Commit 4957c112 authored by Rishabh Dave's avatar Rishabh Dave Committed by Benno Schulenberg
Browse files

browser: select an inaccessible directory also when tabbed

When the user tab-completed a name at the Go To Directory prompt, this
name will end in a slash.  Remove this slash, so the name can be found
in the file list (where directory names don't include the final slash).

This fixes http://savannah.gnu.org/bugs/?48353

.
Signed-off-by: default avatarRishabh Dave <rishabhddave@gmail.com>
No related merge requests found
Showing with 4 additions and 0 deletions
+4 -0
......@@ -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++)
......
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