summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r--src/Hakyll/Core/Provider/Metadata.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs
index 6404205..fcc1d6c 100644
--- a/src/Hakyll/Core/Provider/Metadata.hs
+++ b/src/Hakyll/Core/Provider/Metadata.hs
@@ -21,7 +21,7 @@ import Text.Parsec ((<?>))
import qualified Text.Parsec as P
import Text.Parsec.String (Parser)
import System.FilePath.Posix
-import Control.Monad (liftM)
+import Control.Monad (liftM)
--------------------------------------------------------------------------------
@@ -44,7 +44,7 @@ loadMetadata p identifier = do
Nothing -> return M.empty
Just mi' -> loadMetadataFile $ resourceFilePath p mi'
- gmd <- loadGlobalMetadata p fp
+ gmd <- loadGlobalMetadata p $ toFilePath identifier
return (M.unions [md, emd, gmd], body)
where
@@ -150,13 +150,13 @@ loadGlobalMetadata p fp = do
loadgm dir | dir == providerDirectory p = return []
| otherwise = do
let mfp = combine dir "metadata"
- md <- if M.member (fromFilePath $ normalise mfp) (providerFiles p)
+ md <- if M.member (fromFilePath mfp) (providerFiles p)
then loadOne mfp dir
else return []
others <- loadgm (takeDirectory dir)
return $ others ++ md
loadOne mfp dir = do
- contents <- IO.readFile mfp
+ contents <- IO.readFile $ resourceFilePath p $ fromFilePath mfp
return $ case P.parse namedMetadata mfp contents of
Left err -> error (show err)
Right mds -> findMetadata mds dir