samhocevar / portable-file-dialogs

💬 Portable GUI dialogs library, C++11, single-header
Do What The F*ck You Want To Public License
1.03k stars 99 forks source link

Fix trailing slash of pfd::select_folder() on macOS. #47

Closed melix99 closed 4 years ago

melix99 commented 4 years ago

Using pfd::select_folder() on macOS produces a path with a trailing slash, this pr removes the trailing slash so that the result is coherent with the other platforms.

samhocevar commented 4 years ago

Thanks for the PR. I am afraid I cannot merge it as is, because it will erroneously remove the last character of user input even if it is not a trailing slash (for instance when selecting a file). I have implemented your fix in a different way in 6343fab.