mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
browser: trim all trailing slashes (just in case there are more)
This commit is contained in:
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
Block a user