Testing xdg-mime on large number of files
Сергей Давыдов
shnatsel at gmail.com
Tue Sep 25 15:22:42 PDT 2012
>
> I've added a test program to xdgmime (that's where the code lives) to
> print out the mime-type of files gathered "by name", "by data" and "by
> file". Expanding it to print out mismatches to a separate file would be
> fairly straight forward, and avoid having to use hard links at all.
>
I imagine it would be easy to make it recursive in a shell loop over "tree
-dif ." or "find . -type d -print".
It would be nice if the script could report mismatches to stderr; it would
be easy to sort them from that point on. Also, it might be a good idea to
not complain about mime types that are impossible to detect by content,
like ISO 9660, LZMA archives, etc. so you don't receive any useless bug
reports about them.
By the way, print-mime-data hangs up when it encounters a named pipe. My
script does not because it skips everything that's not a regular file. And
xdg-mime reports it as "inode/fifo".
Thanks for your bug reports, feel free to keep them coming.
>
And thank you for fixing the bugs!
In fact I've reported the mp3 bug (
https://bugs.freedesktop.org/show_bug.cgi?id=55250) to Ubuntu bug tracker
back in 2009, and it was never forwarded to FD.o bug tracker; there are
lots unattended bugs still hanging at
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info
I guess I'll forward everything that's still relevant to the FD.o bug
tracker now.
--
Sergey "Shnatsel" Davidoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20120926/45d9740c/attachment.html>
More information about the xdg
mailing list