4teamwork / ftw.tika

This product integrates Apache Tika for full text indexing with Plone.
4 stars 1 forks source link

Detect errors on password protected files and log an info message #13

Closed jone closed 10 years ago

jone commented 10 years ago

Fixes #10

This PR adds detection of tika errors when a file is password protected. It simply adds an log INFO instead of WARNING with the full java traceback:

2014-03-14 11:41:28 INFO ftw.tika Could not convert password protected document.

Limitations:

The java tracebacks differ for each kind of mimetype. Therefore I've explicitly implemented PDF and MS Office documents.

I've gisted example tracebacks for comparison: https://gist.github.com/jone/9545556

@lukasgraf do you have any inputs on this one? The last commit is the interesting one..

lukasgraf commented 10 years ago

Looks good to me! :+1:

jone commented 10 years ago

@lukasgraf can we merge this?

lukasgraf commented 10 years ago

@jone just did - I will also deploy ftw.tika from master on thursday and cut a new release. So if it doesn't work we'll know ;-)