Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-08 Thread Denis Krjuchkov
I've pushed implementation of standard directories API. It does not support non-POSIX getpwnam_r/getpwuid_r yet, because I don't know how to test it. Please take a look. CommandLine: refactor config search, use standard directory API Main: use standard directory API ConfigPath: use standard

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-05 Thread Denis Krjuchkov
Few more improvements + fix for starting with missing db file on Windows fs/FileSystem.hxx: don't define CheckAccess() with mode on Windows db/SimpleDatabasePlugin.cxx: don't use CheckAccess with mode on Windows fs/FileSystem.hxx: add CheckAccess without mode parameter fs/Traits.cxx: don't return

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-05 Thread Denis Krjuchkov
Next part is reimplementing of what I call standard directories API. g_get_system_config_dirs g_get_user_config_dir g_get_home_dir g_get_user_special_dir(G_USER_DIRECTORY_MUSIC) Windows part looks easy there are plenty of standard functions with different levels of obsolescence for that. For

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-05 Thread Ben Boeckel
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().

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-05 Thread Max Kellermann
On 2013/12/05 17:10, Ben Boeckel maths...@gmail.com wrote: 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

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-04 Thread Denis Krjuchkov
I'm going to replace remaing GLib path management functions. However I have some thoughts at first: I think PathTraits type could be split into two types. One for native paths and one for UTF-8 paths. They could have similar symbol names (e.g. Build, IsAbsolute). This would allow writing more

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-04 Thread Max Kellermann
On 2013/12/04 09:51, Denis Krjuchkov de...@crazydev.net wrote: I'm going to replace remaing GLib path management functions. However I have some thoughts at first: I think PathTraits type could be split into two types. One for native paths and one for UTF-8 paths. They could have similar

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-03 Thread Max Kellermann
On 2013/12/03 09:58, Denis Krjuchkov de...@crazydev.net wrote: I think you're right. Pushed a fix for that. Merged. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a