summaryrefslogtreecommitdiff
path: root/lib/Kiki.hs
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2016-04-28 01:00:52 -0400
committerJames Crayne <jim.crayne@gmail.com>2016-04-28 01:00:52 -0400
commit062d01bc897ad71823029d95918db753dd2581b5 (patch)
treebeb775c3ff4594278d4a8034295e1b8ad193ceb9 /lib/Kiki.hs
parent39b94e9bb752d1a5590c94d2847d421dbcea8e6f (diff)
comment only
Diffstat (limited to 'lib/Kiki.hs')
-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.