steve8x8 / geotoad

Geocaching query tool written in Ruby
https://buymeacoffee.com/steve8x8
Other
28 stars 8 forks source link

Follow XDG Base Directory Specification #305

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please consider following the XDG Base Directory Specification. It boils down 
to placing application files under directory trees specified in a few 
environment variables, if they are set. Otherwise, the specification gives 
defaults that should be used instead. This leads to greater flexibility and 
less dotfile clutter in the home directory. Also, since configuration files, 
cache files and data files from all programs are located together in their 
respective directories, they can be backed up much more easily.

Original issue reported on code.google.com by denis.ka...@gmail.com on 13 Jul 2014 at 1:07

GoogleCodeExporter commented 9 years ago
Err, sorry, I forgot to give you the URL to the spec: 
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Original comment by denis.ka...@gmail.com on 13 Jul 2014 at 1:07

GoogleCodeExporter commented 9 years ago
Excuse my blindness, but what's your point exactly, given that GeoToad is 
provided for more than one OS flavour, and there's already a $GEO_DIR 
environment variable to address the "clutter"?
AFAICT, XDG seems to be limited to Linux (? I haven't looked into Solaris for a 
while, and what about MacOSX?), I might be wrong though.

(I agree that find{Config,Cache}Dir() in config.rb are suboptimal - I somewhat 
inherited them, and patch ideas are welcome.)

Original comment by Steve8x8 on 15 Jul 2014 at 10:50

GoogleCodeExporter commented 9 years ago
What about the (preliminary, somewhat tested) patch attached?
It's supposed to select ~/.config/GeoToad as config directory - if there's no 
~/.geotoad yet from an earlier run. (I strongly vote against a forced 
migration, that's something the user should do herself - it's as easy as 'cd; 
mv .geotoad .config/GeoToad' provided ~/.config does already exist; if not, 
there's no way to detect XDG.)
Opinions?

Original comment by Steve8x8 on 20 Aug 2014 at 6:54

Attachments:

GoogleCodeExporter commented 9 years ago
This issue is believed to be addressed in the latest release.

Original comment by Steve8x8 on 11 Sep 2014 at 2:38

GoogleCodeExporter commented 9 years ago
Closing.

Original comment by Steve8x8 on 20 Jan 2015 at 8:16