[Geany-devel] Prevent un-needed save as
elextr at xxxxx
Sun May 16 09:46:52 UTC 2010
2010/5/16 Enrico Tröger <enrico.troeger at uvena.de>
> On Sun, 16 May 2010 13:07:18 +1000, Lex wrote:
> > This came up on thread "[Geany-devel] Safe file saving - permissions
> > issue" but isn't actually a problem with the filesystem, its just
> > exposed by filesystem problems.
> Thanks for breaking the thread.
> > When a file goes missing and the user does not choose to save or
> > close it, if it is reloaded after the file reappears, Geany still
> > asks for a save as when it only needs to save.
> > The save as dialog is a problem for users on slow network filesystems
> > as it queries all the files in the directory (if the directories are
> No, slow network filesystems are a problem for the Save As dialog :).
I think a bloke called Einstein said something about it all being relative
> Sorry, if I'm trying to open a huge directory over a slow network
> connection, I can't blame the software which is trying to do perform
> the task I requested. What I mean is, if the connection is slow, the
> connection is slow. That's the problem.
> Either don't use network filesystems or fix the connection. Of course,
> this isn't as easy as it is said but still true, IMO.
Yes, I agree, both with fix it and the not so easy, sshfs usually means
remote access which means slooooow.
> > so large they should have been broken up :). Of course users on slow
> > network connections are also the most likely to have files go missing.
> > Attached patch (against r4917) re-sets the real_path of the file on
> > reloads, has been running for me all day with no issues but I only
> > have local filesystems @Jon can you test?
> (from the other thread:)
> > This seems to be because when a document disappears the real path is
> > cleared but when it is reloaded the real path is not set again. I'm
> > not sure about side effects so I am asking Enrico or Nick, in
> > document_open_file_full can the setptr( doc->real_path be moved
> > outside the if (! reload ) safely?
> I think we did it within the if (! reload) for performance reasons,
> getting the realpath is probably a bit expensive (I didn't measured
> it). But if it solves your issues, it's maybe worth running it
I guess realpath has to access the whole path so it may also be slow on the
network, but as you said above thats a fact of life with slow networks.
OTOH it is being called from a file loading routine so its going to access
the filesystem anyway so the difference may not be much.
> I think we can apply it except Nick sees any dangers (he usually
> knows the stuff better than me :D).
> Certainly wait to see if Nick has any problems and lets wait for it to be
tested on a remote link, unless you have done it already.
> Get my GPG key from http://www.uvena.de/pub.asc
> Geany-devel mailing list
> Geany-devel at uvena.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel