Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the XDG base directory specification #336

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Oct 28, 2022

  1. Return XDG_DATA_HOME from Sys_HomeDirectory()

    Fall back on $HOME/.local/share, if necessary. Return "\0" on fail, just
    like the WIndows version.
    
    Use system("mkdir -p") to crate the directory structure in
    Sys_RegisterQWURLProtocol_f()
    mcz committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    eefdd2f View commit details
    Browse the repository at this point in the history
  2. Don't treat '\\' as path separator on non-win32

    Fixes a bug where having an executable called for example
    '/path/to/quake/weird\name' (with a backslash in the filename) would lead
    to FS_InitFilesystemEx(true) using '/path/to/quake/test' as com_basedir
    instead of '/path/to/quake'.
    mcz committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    73aa0cd View commit details
    Browse the repository at this point in the history
  3. Use new Sys_HomeDirectory in fs.c

    AddUserDirectory should still use $HOME. Also change the windows
    Sys_HomeDirectory to return a pointer to a malloc-ed string that
    has to be freed so that it watches the posix version.
    mcz committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    01312e2 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2022

  1. Use $XDG_CONFIG_HOME for config files if poosible

    Fallback to com_gamedir. Also detriplicate code for finding the path of
    the config file.
    Change Signature for Sys_HomeDirectory since it's no longer const.
    Fix some mistakes from previous commits.
    mcz committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    097b140 View commit details
    Browse the repository at this point in the history
  2. Fallback on com_gamedir if com_homedir isn't set

    "Fix" for functions using com_homedir not checking whether it actually
    contains a path, leading to paths that should be relative to com_homedir
    actually being absolute.
    Also remove the now unnecessary checks that did exist in some functions.
    mcz committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    593b66d View commit details
    Browse the repository at this point in the history