summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Provider
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2014-03-26 11:30:32 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2014-03-26 12:05:38 +0100
commit157a81b413ebee001429caf44f8d98958101dc14 (patch)
treed3566bb0db9089e21fff09a2b1d9e4c17f50e22d /src/Hakyll/Core/Provider
parentbc1cfc8d5a8baeb4bc21b992e310ee79fdb38c0f (diff)
downloadhakyll-157a81b413ebee001429caf44f8d98958101dc14.tar.gz
Revert "Fix loadGlobalMetadata on Windows"
This reverts commit e71bbd90a8fb4b5de7796498aed4b95bb7abaebb.
Diffstat (limited to 'src/Hakyll/Core/Provider')
-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 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