| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| public void testTarballWithoutGzipNameMetadata() throws Exception { | ||
| List<Metadata> list = getRecursiveMetadata("test-documents-no-name-metadata.tgz"); | ||
| Metadata last = list.get(list.size() - 1); | ||
| String internalPath = last.get(TikaCoreProperties.INTERNAL_PATH); |
There was a problem hiding this comment.
The point of internal_path is to store what the file contained about the internal path of a resource. This metadata field should tell the user "this was the path that was literally stored in the container file. Tika did no guesswork here".
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
A previous change related to the same JIRA means that INTERNAL_PATH is set using the metadata name from a gzip file. However, many gzips don't have this data. Also other archives like bz2 won't have the data. This PR does two things (1) gets the RESOURCE_NAME from the gzip metadata if possible (a change from existing behaviour) and (2), in the absence of a name in the gzip metadata (due to it not being there in a gzip, or another format such as bzip being used), sets the INTERNAL_PATH to be the same as RESOURCE_NAME