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;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Snip a trailing slash, so the name can be compared. */
|
/* Snip any trailing slashes, so the name can be compared. */
|
||||||
if (strlen(newpath) > 1 && newpath[strlen(newpath) - 1] == '/')
|
while (strlen(newpath) > 1 && newpath[strlen(newpath) - 1] == '/')
|
||||||
newpath[strlen(newpath) - 1] = '\0';
|
newpath[strlen(newpath) - 1] = '\0';
|
||||||
|
|
||||||
/* In case the specified directory cannot be entered, select it
|
/* In case the specified directory cannot be entered, select it
|
||||||
|
|
Loading…
Reference in New Issue