The main issues I see are places where you make a call like:
Code: Select all
if (NicePath("$XDG_CONFIG_HOME/").IsEmpty())
Even if XDG_CONFIG_HOME is empty or unset, the returned path would still contain an / which means it'll never be an empty result. Also a number of times you seem to make multiple NicePath calls with XDG_CONFIG_HOME as the base to test if it's set (this isn't performance-sensitive code, but still). A simple getenv should work, testing if it returns NULL or an empty string.
Relatedly, there is also a $XDG_CACHE_HOME in the XDG standard (with a fallback to $HOME/.cache), which might be better to use instead of "$XDG_CONFIG_HOME/zdoom/cache" or "$HOME/.config/zdoom/cache".