dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #24800
Re: [Branch ~dolfin-core/dolfin/logg] Rev 6372: Change search path of parameter file to ~/.fenics/dolfin_parameters.xml
On Mon, Oct 24, 2011 at 09:02:09AM +0100, Garth N. Wells wrote:
>
>
> On 24 Oct 2011, at 08:25, noreply@xxxxxxxxxxxxx wrote:
>
> > ------------------------------------------------------------
> > revno: 6372
> > committer: Anders Logg <logg@xxxxxxxxx>
> > branch nick: work
> > timestamp: Mon 2011-10-24 09:23:52 +0200
> > message:
> > Change search path of parameter file to ~/.fenics/dolfin_parameters.xml
>
>
> Is this platform independent?
Yes, at least as far as this is working:
#ifdef _WIN32
std::string home_directory(std::getenv("USERPROFILE"));
parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml");
parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml.gz");
#else
std::string home_directory(std::getenv("HOME"));
parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml");
parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml.gz");
#endif
> I would suggest using
>
> ~/.local/fenics
What is ~/.local? It doesn't seem to be a standard place to store
config files. Another option is ~/.config which seems to be populated
with config files from quite a few applications.
--
Anders
> Garth
>
> > modified:
> > ChangeLog
> > dolfin/parameter/GlobalParameters.cpp
> >
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
Follow ups
References