diff options
Diffstat (limited to 'src/Hakyll/Core/ResourceProvider')
-rw-r--r-- | src/Hakyll/Core/ResourceProvider/Internal.hs | 8 | ||||
-rw-r--r-- | src/Hakyll/Core/ResourceProvider/Modified.hs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Hakyll/Core/ResourceProvider/Internal.hs b/src/Hakyll/Core/ResourceProvider/Internal.hs index 1f8f776..02ff98c 100644 --- a/src/Hakyll/Core/ResourceProvider/Internal.hs +++ b/src/Hakyll/Core/ResourceProvider/Internal.hs @@ -48,7 +48,7 @@ newResourceProvider :: Store -- ^ Store to use -> FilePath -- ^ Search directory -> IO ResourceProvider -- ^ Resulting provider newResourceProvider store ignore directory = do - list <- map parseIdentifier . filter (not . ignore) <$> + list <- map fromFilePath . filter (not . ignore) <$> getRecursiveContents False directory cache <- newIORef M.empty return $ ResourceProvider (S.fromList list) cache store @@ -60,10 +60,10 @@ resourceList = S.toList . resourceSet -------------------------------------------------------------------------------- --- | Check if a given resiyrce exists +-- | Check if a given resource exists resourceExists :: ResourceProvider -> Identifier a -> Bool resourceExists provider = - (`S.member` resourceSet provider) . setGroup Nothing . castIdentifier + (`S.member` resourceSet provider) . setVersion Nothing . castIdentifier -------------------------------------------------------------------------------- @@ -71,7 +71,7 @@ resourceExists provider = -- filename) resourceMetadataResource :: Identifier a -> Identifier () resourceMetadataResource = - parseIdentifier . flip addExtension "metadata" . toFilePath + fromFilePath . flip addExtension "metadata" . toFilePath -------------------------------------------------------------------------------- diff --git a/src/Hakyll/Core/ResourceProvider/Modified.hs b/src/Hakyll/Core/ResourceProvider/Modified.hs index 837bc8c..0da3d0f 100644 --- a/src/Hakyll/Core/ResourceProvider/Modified.hs +++ b/src/Hakyll/Core/ResourceProvider/Modified.hs @@ -47,7 +47,7 @@ resourceModified rp r return m where - normalized = castIdentifier $ setGroup Nothing r + normalized = castIdentifier $ setVersion Nothing r exists = resourceExists rp r store = resourceStore rp cacheRef = resourceModifiedCache rp |