On Sun, 16 May 2010 13:07:18 +1000, Lex wrote:
Heya,
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 :). 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.
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 unconditionally.
I think we can apply it except Nick sees any dangers (he usually knows the stuff better than me :D).
Regards, Enrico