luxrays: rename GetConfigDir as GetCacheDir and use XDG_CACHE_HOME according to specifications#615
Conversation
…cording to specifications - ~/.config should only be used as a fallback if XDG_CONFIG_HOME isn't set. - ~/.config or XDG_CONFIG_HOME is a config directory, not a cache directory. - the cache directory is XDG_CACHE_HOME, is not set by default and should fallback on ~/.cache. - getenv returns nullptr but boost::filesystem::path doesn't accept nullptr.
|
I had a look after this was mentioned in #662 Looks OK to me.
No idea if there was an original reason not to use If merged, I suggest to adapt the rest of the function for consistency, I.e. return |
|
I'll take care of that soon, the destination should be version 2.11 |
|
Just a point of verification, since I see that this proposal is made on courtesy of a commercial company: LuxCore is licensed under the Apache 2.0 license, so all contributions are made under this license. Before I merge, @illwieckz, can you please confirm that you explicitly agree with that? |
Yes, it is explicitly permitted to merge this contribution under the Apache 2.0 license. |
|
And just in case: I explicitly permit to merge this contribution under any license. |
|
OK, thank you! I made just a few adjustments as I switch from |
Rename
GetConfigDirasGetCacheDirand useXDG_CACHE_HOMEaccording to specifications.~/.configshould only be used as a fallback ifXDG_CONFIG_HOMEisn't set.~/.configorXDG_CONFIG_HOMEis a config directory, not a cache directory.XDG_CACHE_HOME, is not set by default and should fallback on~/.cache.getenvreturnsnullptrbutboost::filesystem::pathdoesn't acceptnullptr.This work is courtesy of I ♥ Compute initiative funded by 🇫🇷️ rebatir.fr.