Remove trailing slash from FileBrowser initial directory specification. #508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the FileBrowser is initialized with a FilePath that ends in a slash, then if the user hits Enter on the "../" entry to move to the parent directory, the only effect is the removal of that trailing slash. This is relatively unexpected and likely to be unnoticed by the user, possibly leading them to believe that the move-to-parent-directory operation did not work.
Once the trailing slash is removed, the expected move occurs whenever the "../" entry is invoked, and the current path never ends in a trailing slash.
This patch simply removes the trailing slash(es) from the user-supplied FilePath (although it will leave "/" untouched).