zom-ponks / rpcs3-gameupdater

Fetches game updates for the RPCS3 emulator
MIT License
2 stars 1 forks source link

handle configuration file persistence #3

Open zom-ponks opened 4 years ago

zom-ponks commented 4 years ago

This requires two things:

If it's only one file then I suggest .rpcs3downloader.conf as the name, if we end up having multiple files then a directory oughta be created, like $HOME/.rpcs3downloader/ and place any files there

John-Gee commented 4 years ago

Please don't save anything directly in $HOME, but in $XDG_CONFIG_HOME or $HOME/.config (/.local if we ever get to that).

There are mostly 2 reasons for that, separation of stuff like with /usr/bin and /usr/lib but also to not clutter ~/ with so much stuff.

At that point, we might as well create a dir, even if only one file is in there, not sure if there's a major benefit in not doing that till it's really needed and it makes .config look cleaner I think.

zom-ponks commented 4 years ago

Sure, my Debian VM doesn't have $XDG_CONFIG_HOME set, neither does Ubuntu, Ubuntu has .config/ but Deb doesn't. I haven't tested on FreeBSD yet.

I guess we'd be OK creating .config/rpcs3downloader/ and placing stuff there anyway.

On Windows it is simple then, %USERPROFILE%\rpcs3downloader\

Agree with the cluttering point.

John-Gee commented 4 years ago

My Arch does not have $XDG_CONFIG_HOME set either, but I think we should still respect it if it's (ever) set. That's also what RPCS3 does.

I'm surprised your Debian does not have ~/.config, I'd thought it to be pretty common. Based on a very quick search I believe FreeBSD should support the XDG spec, though it may also not have it actually set.

Thank you.