[Geany-devel] GIO file monitor - Re: Changed file saving implementation for systems with GIO
earshinov at xxxxx
Tue Nov 30 08:51:32 UTC 2010
Hello Enrico, Lex, and Nick :)
Sorry for the delay.
On Mon, 29 Nov 2010 12:26:22 +0000%
Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> On Mon, 29 Nov 2010 09:18:56 +1100
> Lex Trotman <elextr at gmail.com> wrote:
> > > I'm not surprised this code broke. I don't maintain it anymore and
> > > didn't expect anyone is still using it.
> > > I even think we should remove it as it never really worked as it
> > > should, AFAIR.
> > > The only reason I didn't yet remove is that it is hard for me as I
> > > spent so much time on it :). But as I don't have time to spend on
> > > it to get it actually working, we either remove it or someone
> > > else wants to maintain/improve/fix it.
I turned on the #define only for an experiment, and it worked nicely
for me (maybe because I don't use remote filesystems). I like that
updated files are colored, so I can easily see which are
changed/removed (btw, "Reload all" command would be useful). The code
broke only after g_file_replace_contents was introduced because the
code didn't account that there can be several change notifications for
single "write". The not-so-large patch I attached fixes this bug.
> > > But as said, so far, I'm not surprised it's dead and I don't care
> > > about fixing it. Sorry.
> > Well, Eugenes solution looks ok, if he provides a clean patch with
> > the last things discussed it could be applied to unstable for
> > testing.
You mean changing from "doc->priv->mtime < st.st_mtime" to
"doc->priv->mtime != st.st_mtime"? Yes, as I already wrote before, I
think it's meaningful, so I'll send an updated patch if needed.
Also, if we check mtime on change notification, maybe we no longer need
FILE_IGNORE constant. This will cost us an additional mtime check.
> Yes, or perhaps it could go to trunk - I think USE_GIO_FILEMON is not
> documented anywhere so it shouldn't affect ordinary users.
I agree :)
More information about the Devel