summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Kiki.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Kiki.hs b/lib/Kiki.hs
index 8090aac..0d2844f 100644
--- a/lib/Kiki.hs
+++ b/lib/Kiki.hs
@@ -237,7 +237,15 @@ refreshCache rt rootdir = do
237 rename (tmpdir ++ ".link") destdir 237 rename (tmpdir ++ ".link") destdir
238 er <- T.mapM dotlock_release lock 238 er <- T.mapM dotlock_release lock
239 void $ T.mapM removeDirectoryRecursive oldcommit 239 void $ T.mapM removeDirectoryRecursive oldcommit
240 return (mkpath,commit) 240 -- Present transaction is Write only (or Write-Before-Read) which is fine.
241 -- If ever Read-Before-Write is required, uncomment and use:
242 -- let readyReadBeforeWrite pth = do
243 -- let copyIt = do
244 -- createDirectoryIfMissing True (takeDirectory (mkpath pth))
245 -- copyFile (destdir </> unslash pth) (mkpath pth)
246 -- doesFileExist (mkpath pth) >>= flip when copyIt
247 -- return (mkpath pth)
248 return (mkpath, commit {-, readyReadBeforeWrite -})
241 (mkpath, commit) <- getMkPathAndCommit (fromMaybe "" rootdir ++ "/var/cache/kiki/config") 249 (mkpath, commit) <- getMkPathAndCommit (fromMaybe "" rootdir ++ "/var/cache/kiki/config")
242 250
243 -- Generete hosts file. 251 -- Generete hosts file.