[Geany] File has been modified dialog over cifs

John Beaumont | Beecroft john.beaumont at xxxxx
Thu Oct 20 07:43:04 UTC 2011


On Thu, 20 Oct 2011 09:15:38 +1100
Lex Trotman <elextr at gmail.com> wrote:

> On 20 October 2011 01:29, John Beaumont | Beecroft
> <john.beaumont at beecroft-science.co.uk> wrote:
> > When saving files over a remote samba share I get persistent
> > messages saying the source file has been modified. Even though no
> > other process is using the file.
> >
> > Changing the disk check timeout to zero remedies the sporadic
> > messages but I still get a warning on every save. I assume geany is
> > just going on the modification timestamp which always appears to be
> > 1 second out. The server's clock and my client's clock are
> > synchronised although this shouldn't matter anyway.
> >
> > Is this a bug with cifs, or with geany? Got any ideas on how to fix
> > it?
> >
> 
> Hi John,
> 
> You are correct that by default Geany just uses the mtime to look for
> time differences.
> 
> There can be issues with remote m-times for example the sequence write
> file, read m-time can return the old m-time if the network hasn't
> finished writing the file yet.
> 
> Partly because of the overhead and partly because of these issues with
> remote timestamps Geany does not monitor files it can determine are
> remote.  Unfortunately it can be difficult to portably do so for
> locally mounted remote filesystems, eg samba, nfs etc.
> 
> So its not really a bug in either Geany or Samba, more a situation
> where unexpected network delays give the wrong answer.
> 
> As you have found you can disable the intermittent checks, but not the
> save time check since this warning has saved many a person from
> accidental data loss.
> 
> If you are building your Geany from source you could try setting the
> USE_GIO_FILEMON symbol to use GIO checking instead.  It may be better
> or worse :)
> 
> Cheers
> Lex
> 
> 

Thank you, and others for the information.

I have found that if I mount the samba share through an ssh tunnel,
then the timestamp issue goes away. This may tie in with your
explanation of Geany not checking the timestamp of remote shares.

Forgot to mention my Geany version is 0.20.

Thanks, John.



More information about the Users mailing list