Re: XDG_CONFIG_HOME support in mbsync

2020-11-30 Thread Andreas Grapentin
On Sun, Nov 29, 2020 at 07:30:44PM +0100, Oswald Buddenhagen wrote: > On Sun, Nov 29, 2020 at 05:37:43PM +0100, Andreas Grapentin wrote: > > maybe the version XDG_CONFIG_HOME/isync/mbsyncrc makes sense, in case > > any other utilities that are part of isync will provide config files in > > the fut

Re: XDG_CONFIG_HOME support in mbsync

2020-11-30 Thread Andreas Grapentin
On Mon, Nov 30, 2020 at 07:31:20PM +0100, Andreas Grapentin wrote: > > > > > + nfsnprintf( path, sizeof(path), "%s/." EXE "rc", Home ); > > > > > + cfile.file = path; > > > + > > that's also unnecessary, as the address didn't change. > > Could you please clarify

Re: XDG_CONFIG_HOME support in mbsync

2020-11-30 Thread Oswald Buddenhagen
On Mon, Nov 30, 2020 at 07:31:20PM +0100, Andreas Grapentin wrote: On Sun, Nov 29, 2020 at 07:30:44PM +0100, Oswald Buddenhagen wrote: On Sun, Nov 29, 2020 at 05:37:43PM +0100, Andreas Grapentin wrote: > + errno = 0; > that's unnecessary - the next error would overwrite it anyw

Re: XDG_CONFIG_HOME support in mbsync

2020-11-30 Thread Andreas Grapentin
On Mon, Nov 30, 2020 at 07:56:36PM +0100, Oswald Buddenhagen wrote: > On Mon, Nov 30, 2020 at 07:31:20PM +0100, Andreas Grapentin wrote: > > On Sun, Nov 29, 2020 at 07:30:44PM +0100, Oswald Buddenhagen wrote: > > > On Sun, Nov 29, 2020 at 05:37:43PM +0100, Andreas Grapentin wrote: > > > > +

[Patch 2/2] XDG_DATA_HOME support in mbsync for SyncState

2020-11-30 Thread Andreas Grapentin
This is a first attempt at supporting $XDG_DATA_HOME/mbsync as a SyncState location in addition to ~/.mbsync. The behavior changed by this patch is as follows: To determine the SyncState directory, if not set explicitly - expand $XDG_DATA_HOME from the environment, falling back to $HOME/.loca