GNOME Bugzilla – Bug 329561
Should not modify the access time of files
Last modified: 2007-01-25 17:14:20 UTC
Please describe the problem: i save and open many files in /tmp. i discovered that the file chooser dialog (which i usually use through thunderbird/firefox) changes the access time of all files under /tmp. this in turn means that tmpwatch doesn't remove them! in addition, this dialog is horribly slow, even if i use ctrl-l to point to a specific file Steps to reproduce: 1. ls -ul /tmp 2. open the file chooser dialog and point it to /tmp (i do it through thunderbird's 'Attach') 3. ls -ul /tmp Actual results: Expected results: the access time should not change Does this happen every time? yes Other information:
It only changes the access time of files that do not have an extension. This happens because without an extension, we have to open and sniff the file to figure out its MIME type. About the slowness - can you provide a "ls -l" of /tmp? Is this the folder for which it is slow?
who wants to know the mime type when saving / opening a file? (i am just looking for a specific file to open, or save, i don't care much about the rest) well, i currently have 473 files (mainly, because tmpwatch doesn't delete old ones). many are indeed without extension, as is the norm in linux. the slownest is also for /usr/bin, when i need to choose an application to open a file (movie, document etc.)
Opening a file chooser in /usr/bin is the wrong UI to pick a certain type of application anyway...
(In reply to comment #2) > who wants to know the mime type when saving / opening a file? (i am just > looking for a specific file to open, or save, i don't care much about the rest) The file chooser wants to know the MIME type so that it can display the right icon for files. > well, i currently have 473 files (mainly, because tmpwatch doesn't delete old > ones). many are indeed without extension, as is the norm in linux. > > the slownest is also for /usr/bin, when i need to choose an application to open > a file (movie, document etc.) We'll be able to solve this once we integrate Kris Rietveld's patch for asynchronous loading in the file chooser. Then we can have a two-stage loading mechanism for MIME types. The first stage would just use xdg_mime_get_mime_type_from_filename(), which doesn't do sniffing; if that is ambiguous, a second stage would use xdg_mime_get_mime_type_for_file(), which does sniffing if needed. *Then* we can have a blacklist of special directories in which we never want to do sniffing, similar to what we do now for AFS directories.
*** This bug has been marked as a duplicate of 322314 ***