Subject: Re: Support the freedesktop base directory specification on *nix derived operating systems
From: Ondřej Jirman
Date: Wed, 8 Jan 2020 04:11:45 +0100
Hi,

On Tue, Jan 07, 2020 at 06:26:46PM -0800, Ryan Delaney wrote:
> Hi,
> 
> Currently, megatools looks for ./mega.ini and then ~/.mega.ini
> 
> Following the freedesktop basedir spec
> <https://www.freedesktop.org/wiki/Specifications/basedir-spec/> I propose
> the following precedence instead:
> 
> 1. ./mega.ini
> 2. "$XDG_CONFIG_HOME"/megatools/config
> 3. "$HOME"/.config/megatools/config
> 4. ~/.mega.ini

You probably want to add the suggested env var and the current command line
argument handling for --config and --ignore-config-file here too. Otherwise this
is fine by me.

regards,
	o.

> By falling back to old behavior in #4, backward compatibility would be
> maintained.
> --
> Regards,
> Ryan Delaney
> ryan.delaney@gmail.com