@@ -12,7 +12,6 @@ import Control.Concurrent.MVar (newEmptyMVar, takeMVar,
12import Control.Exception (AsyncException, fromException,
12import Control.Exception (AsyncException, fromException,
13 handle, throw)
13 handle, throw)
14import Control.Monad (forever, void, when)
14import Control.Monad (forever, void, when)
15−import Filesystem.Path.CurrentOS (decodeString, encodeString)
16import System.Directory (canonicalizePath)
15import System.Directory (canonicalizePath)
17import System.FilePath (pathSeparators)
16import System.FilePath (pathSeparators)
18import System.FSNotify (Event (..), startManager,
17import System.FSNotify (Event (..), startManager,
@@ -41,7 +40,7 @@ import Hakyll.Core.Identifier.Pattern
41-- a site as soon as any changes occur
40-- a site as soon as any changes occur
42watchUpdates :: Configuration -> IO Pattern -> IO ()
41watchUpdates :: Configuration -> IO Pattern -> IO ()
43watchUpdates conf update = do
42watchUpdates conf update = do
44− let providerDir = decodeString $ providerDirectory conf
43+ let providerDir = providerDirectory conf
45 shouldBuild <- newEmptyMVar
44 shouldBuild <- newEmptyMVar
46 pattern <- update
45 pattern <- update
47 fullProviderDir <- canonicalizePath $ providerDirectory conf
46 fullProviderDir <- canonicalizePath $ providerDirectory conf
@@ -66,7 +65,7 @@ watchUpdates conf update = do
66 (\e -> case fromException e of
65 (\e -> case fromException e of
67 Nothing -> putStrLn (show e)
66 Nothing -> putStrLn (show e)
68 Just async -> throw (async :: AsyncException))
67 Just async -> throw (async :: AsyncException))
69− (update' event $ encodeString providerDir)
68+ (update' event providerDir)
71 -- Send an event whenever something occurs so that the thread described
70 -- Send an event whenever something occurs so that the thread described
72 -- above will do a build.
71 -- above will do a build.
@@ -107,7 +106,7 @@ watchUpdates conf update = do
108--------------------------------------------------------------------------------
107--------------------------------------------------------------------------------
109eventPath :: Event -> FilePath
108eventPath :: Event -> FilePath
110−eventPath evt = encodeString $ evtPath evt
109+eventPath evt = evtPath evt
112 evtPath (Added p _) = p
111 evtPath (Added p _) = p
113 evtPath (Modified p _) = p
112 evtPath (Modified p _) = p