In order to save one syscall, if the caller has a struct stat lying around. The following patch just adds a struct stat * argument to xdg_mime_get_mime_type_for_file(). Alternatively, you could add a get_mime_type_for_file_full() with that signature, and turn xdg_mime_get_mime_type_for_file() into a macro.
Created attachment 2883 [details] xorg.conf.optiplex
2005-10-18 Matthias Clasen <mclasen@redhat.com> * src/xdgmime.h: * src/xdgmime.c: Add a struct statbuf * argument to xdg_mime_get_mime_type_for_file(). (#3529) * src/test-mime.c: Adjust callers.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.