[
https://issues.apache.org/jira/browse/TIKA-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14119949#comment-14119949
]
Piero Ottuzzi commented on TIKA-1409:
-------------------------------------
Hi,
I can agree with you that this is almost a non-sense but a search on google
reports that on many linux distros the mime type for directory is
"inode/directory" but I cannot find it in tika-mimetypes.xml[1].
So the test was done only to understand what apache tika was going to print and
I was a bit surprised by the unexpected result.
Do you think it is worth to add "inode/directory" to Tika as a mime-type for
directories?
It is a simple, yet not fully RFC compliant, way to fix this corner case.
Thanks
Bye
Piero
[1]http://svn.apache.org/repos/asf/tika/trunk/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
> Error asking for a directory mime-type
> --------------------------------------
>
> Key: TIKA-1409
> URL: https://issues.apache.org/jira/browse/TIKA-1409
> Project: Tika
> Issue Type: Bug
> Components: general
> Affects Versions: 1.5
> Environment: Windows 7 and JDK 1.8
> Reporter: Piero Ottuzzi
>
> Hi there,
> just for curiosity I used the code you can find at the end of the "Content
> and language detection" page[1] to get the Tika mimetype for a directory.
> I tried on a well known directory (System.getProperty("user.home")) and I got:
> java.io.FileNotFoundException: C:\Users\2913 (Access is denied)
> at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
> at java.io.FileInputStream.<init>(FileInputStream.java:131)
> ~[na:1.8.0_11]
> at org.apache.tika.io.TikaInputStream.<init>(TikaInputStream.java:444)
> ~[tika-core-1.5.jar:na]
> at org.apache.tika.io.TikaInputStream.get(TikaInputStream.java:231)
> ~[tika-core-1.5.jar:na]
> at org.apache.tika.io.TikaInputStream.get(TikaInputStream.java:212)
> ~[tika-core-1.5.jar:na]
> Obviously the directory exists and it is readable.
> Is this the expected behaviour?
> Thanks
> Bye
> Piero
> [1]http://tika.apache.org/1.5/detection.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)