Skip to content

Instantly share code, notes, and snippets.

@namandixit
Last active December 16, 2024 05:00
Show Gist options
  • Save namandixit/99e81f9004385c63106cc4476625115c to your computer and use it in GitHub Desktop.
Save namandixit/99e81f9004385c63106cc4476625115c to your computer and use it in GitHub Desktop.
Commands for getting the absolute paths from relative paths

Since SDL is not going to add the feature of converting relative paths to absolute paths, here I will document the commands for each platform to do so manually using the SDL_Process API.

If the relative path is stored in variable called relative_path, the run:

  1. Windows:
    txtfmtAppendF(&tf, "cmd /C for %%i in (\"%s\") do @echo %%~fi", relative_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment