[ 
https://issues.apache.org/jira/browse/TIKA-3783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Allison resolved TIKA-3783.
-------------------------------
    Fix Version/s: 2.4.1
       Resolution: Fixed

Thank you, [~nogaav]!

> Filename detection misses when a # and several . are in a filename
> ------------------------------------------------------------------
>
>                 Key: TIKA-3783
>                 URL: https://issues.apache.org/jira/browse/TIKA-3783
>             Project: Tika
>          Issue Type: Bug
>          Components: detector
>         Environment: java 8
> [TIKA-1928|https://issues.apache.org/jira/browse/TIKA-1928]
>            Reporter: Alexander
>            Priority: Minor
>             Fix For: 2.4.1
>
>
> NameDetector.detect() strip any fragments after #, but not only after 
> extension, when filename contains dots and hashes.
> Example: 'ABC#192.168.0.1#2.xxx' will be stripped to 'ABC#192.168.0.1'.
> There are filenames that contains dots not only in extension.
> Should change line:
> {code:java}
> int dot = name.indexOf('.')
> {code}
> [https://github.com/apache/tika/blob/a52e4d153e950077f7fdedadcc5d75604fe2563d/tika-core/src/main/java/org/apache/tika/detect/NameDetector.java#L119]
> to:
> {code:java}
> int dot = name.lastIndexOf('.');
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to