From 157a81b413ebee001429caf44f8d98958101dc14 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 26 Mar 2014 11:30:32 +0100 Subject: Revert "Fix loadGlobalMetadata on Windows" This reverts commit e71bbd90a8fb4b5de7796498aed4b95bb7abaebb. --- src/Hakyll/Core/Provider/Metadata.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Hakyll') diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs index 8af3757..c1579fd 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 $ toFilePath identifier + gmd <- loadGlobalMetadata p fp return (M.unions [md, 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 mfp) (providerFiles p) + md <- if M.member (fromFilePath $ normalise mfp) (providerFiles p) then loadOne mfp dir else return [] others <- loadgm (takeDirectory dir) return $ others ++ md loadOne mfp dir = do - contents <- IO.readFile $ resourceFilePath p $ fromFilePath mfp + contents <- IO.readFile mfp return $ case P.parse namedMetadata mfp contents of Left err -> error (show err) Right mds -> findMetadata mds dir -- cgit v1.2.3