browser: trim all trailing slashes (just in case there are more)
parent
4957c1121d
commit
03a81aa9c5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue