Description
The Problem
Currently, ferium uses ~/.config
path on all platforms, which resolves to C:\Users\<User>\.config
on Windows. Even though this path is used popularly for Windows apps, a Windows standard way should be preferred.
Why?
Most launchers already use platform specific paths, and it's nicer to use them.
Your Solution(s)
Use FOLDERID_RoamingAppData
or FOLDERID_LocalAppData
(aka %APPDATA%
or %LOCALAPPDATA
respectively) for Windows. We can do this in 3 ways:
- Just append
\AppData\Roaming\
tolibium::HOME
. This is the simplest way, but for reasons, Windows recommends usingFOLDERID
s directly (which is why two the two other solutions below). - Use
sys-traits
crate'sEnvCacheDir::env_cache_dir
(which whatDeno
uses)- The issue with this is, this crate only supports
FOLDERID_LocalAppData
, which is not a bad thing, butFOLDERID_RoamingAppData
is more favourable to use.
- The issue with this is, this crate only supports
- Use
windows-rs
directly- Since this will be a Windows only implementation, a manual simple implementation could be done, similar to
cargo
's code.
- Since this will be a Windows only implementation, a manual simple implementation could be done, similar to
For testing, I've created a branch using the first solution, and everything works so far. If this is going to be considered, I can create a PR directly.