// https://bugs.edge.launchpad.net/gnubook/+bug/385397
$imageFormatRegex = '@' . preg_quote($prefix, '@') . '_(jp2|tif|jpg)\.(zip|tar)$@';
- $baseLength = strlen($item->metadataGrabber->mainDir . '/');
+ $baseLength = strlen($item->getMainDir() . '/');
foreach ($item->getFiles() as $location => $fileInfo) {
$filename = substr($location, $baseLength);