From d85f982f505f8a79a38c4082021aa1f0908606d9 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Thu, 28 Apr 2016 01:56:37 -0400 Subject: use makeRelative, for more flexible mkpath --- lib/Kiki.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Kiki.hs b/lib/Kiki.hs index 4189f77..38064ff 100644 --- a/lib/Kiki.hs +++ b/lib/Kiki.hs @@ -228,7 +228,7 @@ refreshCache rt rootdir = do createSymbolicLink tmpdir (tmpdir ++ ".link") lock <- dotlock_create destdir 0 T.mapM (flip dotlock_take timeout) lock - let mkpath pth = tmpdir unslash pth + let mkpath pth = tmpdir unslash (makeRelative destdir pth) commit = do oldcommit <- (Just <$> readSymbolicLink destdir) `catch` \e -> do @@ -244,7 +244,7 @@ refreshCache rt rootdir = do -- let readyReadBeforeWrite pth = do -- let copyIt = do -- createDirectoryIfMissing True (takeDirectory (mkpath pth)) - -- copyFile (destdir unslash pth) (mkpath pth) + -- copyFile (destdir unslash (makeRelative destdir pth) (mkpath pth) -- doesFileExist (mkpath pth) >>= flip when copyIt -- return (mkpath pth) return (mkpath, commit {-, readyReadBeforeWrite -}) -- cgit v1.2.3