Wrong MIME Type When NFS Is Slightly Busy
We're using Nautilus on a NFS drive. When the drive gets busy because of backups running, Nautilus will generate the wrong MIME type for documents that are being edited by our users. It's easily replicated:
1) User opens Nautilus and navigates to a folder 2) User double-clicks on a file such as cityoflargo.odt and LibreOffice opens. User leaves Nautilus open 3) User makes edits to the document and overwrites the old document 4) Nautilus detects file change (INOTIFY?) and refreshes itself automatically 5) Because the file is handed to NFS in async, Nautilus sees this is a zero byte file and the thumbnail changes to Gedit.
If you manually refresh the folder, the correct thumbnail re-appears and things work as expected. However,if the user does not do this and double clicks on this errant mime type, it will actually open cityoflargo.odt with Gedit.
I think we are literally talking about an issue of 1-2 seconds where Nautilus would see the right mime type.
I have been thinking about the right approach for this that will meet the needs of others. I'm not sure that Nautilus is aware that NFS is a remote drive. But I'm thinking that a dconf setting should be provided to allow for a specified time delay after INOTIFY and before folder refresh. It would be nice if I didn't have to impose this time delay on local drives. But if that is easier than detecting if it's a mount, that would work. Very probably I would set this to 2 seconds or similar.
Deployment is on Ubuntu, Nautilus is 1:3.18.4.is.3.14.3-0ubuntu5
I can take screenshots if I have not been clear.