@@ -169,10 +169,10 @@ getManifest archive = do
169169 ns <- mkE "xmlns not in namespaces" (lookup "xmlns" namespaces)
170170 as <- liftM ((map attrToPair) . elAttribs)
171171 (findElementE (QName "rootfile" (Just ns) Nothing) docElem)
172− root <- mkE "Root not found" (lookup "full-path" as)
173− let rootdir = dropFileName root
172+ manifestFile <- mkE "Root not found" (lookup "full-path" as)
173+ let rootdir = dropFileName manifestFile
174174 --mime <- lookup "media-type" as
175− manifest <- findEntryByPathE root archive
175+ manifest <- findEntryByPathE manifestFile archive
176176 liftM ((,) rootdir) (parseXMLDocE . UTF8.toStringLazy . fromEntry $ manifest)
177177
178178-- Fixup
@@ -272,7 +272,8 @@ findAttrE :: MonadError String m => QName -> Element -> m String
272272findAttrE q e = mkE "findAttr" $ findAttr q e
273273
274274findEntryByPathE :: MonadError String m => FilePath -> Archive -> m Entry
275−findEntryByPathE path a = mkE ("No entry on path: " ++ path) $ findEntryByPath path a
275+findEntryByPathE (normalise -> path) a =
276+ mkE ("No entry on path: " ++ path) $ findEntryByPath path a
276277
277278parseXMLDocE :: MonadError String m => String -> m Element
278279parseXMLDocE doc = mkE "Unable to parse XML doc" $ parseXMLDoc doc