fix: Add Config/DataHomeDir paths before Config/DataDirs paths (#586)
fix not saving to "XDG_DATA_HOME", when "XDG_DATA_DIRS" is available. fix "Content Store" persist in flatpak. XDG specification specifies how to find config and data directories on linux systems. Specifically, it says this: - Data should be written to $XDG_DATA_HOME - Config should be written to $XDG_CONFIG_HOME - Data should be read from $XDG_DATA_HOME:$XDG_DATA_DIRS - Config should be read from $XDG_CONFIG_HOME:$XDG_CONFIG_DIRS
This commit is contained in:
parent
2cb65aac72
commit
3b8b95a22f
@ -247,8 +247,8 @@ namespace hex::fs {
|
||||
std::vector<std::fs::path> configDirs = xdg::ConfigDirs();
|
||||
std::vector<std::fs::path> dataDirs = xdg::DataDirs();
|
||||
|
||||
configDirs.push_back(xdg::ConfigHomeDir());
|
||||
dataDirs.push_back(xdg::DataHomeDir());
|
||||
configDirs.insert(configDirs.begin(), xdg::ConfigHomeDir());
|
||||
dataDirs.insert(dataDirs.begin(), xdg::DataHomeDir());
|
||||
|
||||
for (auto &dir : dataDirs)
|
||||
dir = dir / "imhex";
|
||||
|
Loading…
x
Reference in New Issue
Block a user