summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core
diff options
context:
space:
mode:
authorAlexey Kreshchuk <krsch@iitp.ru>2013-10-12 23:33:08 +0400
committerAlexey Kreshchuk <akrsch@gmail.com>2013-10-12 23:57:17 +0400
commite71bbd90a8fb4b5de7796498aed4b95bb7abaebb (patch)
treea603f824cb50341d33866ceefc18443c7a94442e /src/Hakyll/Core
parente0f45b29b3f5e17c04ecd054b6c26c67d71e10e4 (diff)
downloadhakyll-e71bbd90a8fb4b5de7796498aed4b95bb7abaebb.tar.gz
Fix loadGlobalMetadata on Windows
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