Commit 03a81aa9 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

browser: trim all trailing slashes (just in case there are more)

No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -271,8 +271,8 @@ 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] == '/')
/* Snip any trailing slashes, so the name can be compared. */
while (strlen(newpath) > 1 && newpath[strlen(newpath) - 1] == '/')
newpath[strlen(newpath) - 1] = '\0';
/* In case the specified directory cannot be entered, select it
......
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