diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2015-08-01 10:14:21 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2015-08-01 10:15:03 +0200 |
commit | df2bc9fa9e244f77a3fce8591da45ce51dc3005c (patch) | |
tree | fa08628fd5c9c53f40232be73f52098e2531d949 /src | |
parent | 7fedfd3585de8968c14acac6fb5b5056c189eefc (diff) | |
download | hakyll-df2bc9fa9e244f77a3fce8591da45ce51dc3005c.tar.gz |
Bump fsnotify to 0.2
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Preview/Poll.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Hakyll/Preview/Poll.hs b/src/Hakyll/Preview/Poll.hs index 318be69..e197d3f 100644 --- a/src/Hakyll/Preview/Poll.hs +++ b/src/Hakyll/Preview/Poll.hs @@ -12,7 +12,6 @@ import Control.Concurrent.MVar (newEmptyMVar, takeMVar, import Control.Exception (AsyncException, fromException, handle, throw) import Control.Monad (forever, void, when) -import Filesystem.Path.CurrentOS (decodeString, encodeString) import System.Directory (canonicalizePath) import System.FilePath (pathSeparators) import System.FSNotify (Event (..), startManager, @@ -41,7 +40,7 @@ import Hakyll.Core.Identifier.Pattern -- a site as soon as any changes occur watchUpdates :: Configuration -> IO Pattern -> IO () watchUpdates conf update = do - let providerDir = decodeString $ providerDirectory conf + let providerDir = providerDirectory conf shouldBuild <- newEmptyMVar pattern <- update fullProviderDir <- canonicalizePath $ providerDirectory conf @@ -66,7 +65,7 @@ watchUpdates conf update = do (\e -> case fromException e of Nothing -> putStrLn (show e) Just async -> throw (async :: AsyncException)) - (update' event $ encodeString providerDir) + (update' event providerDir) -- Send an event whenever something occurs so that the thread described -- above will do a build. @@ -107,7 +106,7 @@ watchUpdates conf update = do -------------------------------------------------------------------------------- eventPath :: Event -> FilePath -eventPath evt = encodeString $ evtPath evt +eventPath evt = evtPath evt where evtPath (Added p _) = p evtPath (Modified p _) = p |