On Thu, Dec 05, 2013 at 19:17:56 +0600, Denis Krjuchkov wrote:
> g_get_home_dir() works differently depending on GLib version.
> Newer GLib versions check $HOME first
> and if it's empty use getpwnam_r() to obtain home directory for 
> currently user.
> Old versions go straight into using getpwnam_r().
> What approach should we use?

Please use $HOME then fall back to getpwnam_r(). I have a user with the
same uid/gid, but a different name and $HOME (mainly to put games into a
special root without a separate login), but getpwnam_r() gets my main
user's $HOME because it's earlier in the passwd file.

--Ben

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to