filesystem: SDL_GetCurrentDirectory() should add a path separator at the end.

This commit is contained in:
Ryan C. Gordon 2025-01-15 17:06:09 -05:00
parent 87e1b0eb89
commit eb793dede7
3 changed files with 21 additions and 4 deletions

View file

@ -483,6 +483,9 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const ch
* platforms without this concept, this would cause surprises with file access
* outside of SDL.
*
* The returned path is guaranteed to end with a path separator ('\\' on
* Windows, '/' on most other platforms).
*
* \returns a UTF-8 string of the current working directory in
* platform-dependent notation. NULL if there's a problem. This
* should be freed with SDL_free() when it is no longer needed.