After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 329561 - Should not modify the access time of files
Should not modify the access time of files
Status: RESOLVED DUPLICATE of bug 322314
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.6.x
Other All
: Normal normal
: Medium fix
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2006-02-02 06:27 UTC by Ittay Dror
Modified: 2007-01-25 17:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Ittay Dror 2006-02-02 06:27:27 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:
Comment 1 Federico Mena Quintero 2006-02-25 02:15:37 UTC
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?
Comment 2 Ittay Dror 2006-02-25 18:29:13 UTC
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.)
Comment 3 Matthias Clasen 2006-02-25 22:24:59 UTC
Opening a file chooser in /usr/bin is the wrong UI to pick a certain type of
application anyway...
Comment 4 Federico Mena Quintero 2006-02-27 16:44:26 UTC
(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.
Comment 5 Federico Mena Quintero 2007-01-25 17:14:20 UTC

*** This bug has been marked as a duplicate of 322314 ***